mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Merge pull request #335 from rhooper/utf-8-in-config
Handle UTF-8 in config file
This commit is contained in:
commit
985f20d281
@ -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 {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user