Skip to content

Commit

Permalink
use the recommended yaml.safe_load function
Browse files Browse the repository at this point in the history
reason: with pyyaml >= 5, the load function without Loader is deprecated.
Even if we do not use version 5 for now, we should use good practices.
https://pyyaml.org/wiki/PyYAMLDocumentation#loading-yaml
yaml/pyyaml#257
  • Loading branch information
fblackburn1 committed Apr 16, 2019
1 parent 6ad01a7 commit 0926668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xivo_confd/config.py
Expand Up @@ -195,7 +195,7 @@
def load(argv):
try:
with open(WIZARD_KEY_FILE, 'r') as f:
key_config = {'wizard': yaml.load(f)}
key_config = {'wizard': yaml.safe_load(f)}
except IOError:
key_config = {}

Expand Down

0 comments on commit 0926668

Please sign in to comment.