Ensure config file is always opened with UTF-8

This commit is contained in:
Kovid Goyal
2018-03-02 08:47:13 +05:30
parent 139838c717
commit 721595ef04

View File

@@ -403,7 +403,7 @@ def load_config(*paths, overrides=None) -> Options:
if not path: if not path:
continue continue
try: try:
f = open(path) f = open(path, encoding='utf-8')
except FileNotFoundError: except FileNotFoundError:
continue continue
with f: with f: