Skip to content

Commit

Permalink
Merge pull request #186 from agebhar1/feature/PyYAML5
Browse files Browse the repository at this point in the history
fix PyYAML warning on call of `yaml.load(…)`
  • Loading branch information
Nicolas committed Jul 28, 2019
2 parents 3f8c994 + f8751ca commit 4d44a05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hbmqtt/utils.py
Expand Up @@ -48,7 +48,7 @@ def read_yaml_config(config_file):
config = None
try:
with open(config_file, 'r') as stream:
config = yaml.load(stream)
config = yaml.full_load(stream) if hasattr(yaml, 'full_load') else yaml.load(stream)
except yaml.YAMLError as exc:
logger.error("Invalid config_file %s: %s" % (config_file, exc))
return config

0 comments on commit 4d44a05

Please sign in to comment.