Handle UTF-8 in config file.

pull/335/head
Roy Hooper 2015-09-07 10:56:16 -04:00
parent 97eb84919b
commit d0cda964ac
1 changed files with 1 additions and 1 deletions

View File

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