Dont fail for non-UTF-8 encoded config files, simply replace the undecodeable chars instead

This commit is contained in:
Kovid Goyal 2018-03-02 08:49:27 +05:30
parent 721595ef04
commit aad4a1fd6a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

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