Handle UTF-8 in config file.

This commit is contained in:
Roy Hooper 2015-09-07 10:56:16 -04:00
parent 97eb84919b
commit d0cda964ac

View file

@ -124,7 +124,7 @@ def load_yaml_config_file(config_path):
def parse(fname):
""" Parse a YAML file. """
try:
with open(fname) as conf_file:
with open(fname, encoding='utf-8') as conf_file:
# If configuration file is empty YAML returns None
# We convert that to an empty dict
return yaml.load(conf_file) or {}