Handle UTF-8 in config file.
parent
97eb84919b
commit
d0cda964ac
|
@ -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 {}
|
||||||
|
|
Loading…
Reference in New Issue