Fix deprecation warning when calling yaml.load().

This was the message: YAMLLoadWarning: calling yaml.load() without
Loader=... is deprecated, as the default Loader is unsafe
This commit is contained in:
Hartmut Goebel
2019-03-30 19:51:00 +01:00
parent 0b13bbbabe
commit 13d1dd2623

View File

@ -50,7 +50,7 @@ def save_config(config, config_file):
def read_config(config_file):
config = {}
with open(config_file) as fh:
config = yaml.load(fh)
config = yaml.load(fh, yaml.SafeLoader)
if 'updated' in config:
config['updated'] = dateutil.parser.parse(config['updated'])
else: