Skip to content

Commit

Permalink
Specify encoding and error handling in load_yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasselmeci committed Oct 30, 2018
1 parent 592c6b0 commit dc715ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webapp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def load_yaml_file(filename) -> Dict:
"""
try:
with open(filename) as stream:
with open(filename, encoding='utf-8', errors='surrogateescape') as stream:
return yaml.safe_load(stream)
except yaml.YAMLError as e:
log.error("YAML error in %s: %s", filename, e)
Expand Down

0 comments on commit dc715ed

Please sign in to comment.