1
0
Fork 0

add utf-8 encoding to the open() call (#12388)

This commit is contained in:
Zach White 2021-03-27 08:55:47 -07:00 committed by GitHub
parent a866fbf381
commit 5dc7951dc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ def json_load(json_file):
Note: file must be a Path object.
"""
try:
return hjson.load(json_file.open())
return hjson.load(json_file.open(encoding='utf-8'))
except json.decoder.JSONDecodeError as e:
cli.log.error('Invalid JSON encountered attempting to load {fg_cyan}%s{fg_reset}:\n\t{fg_red}%s', json_file, e)