kopia lustrzana https://github.com/Yakifo/amqtt
Merge pull request #186 from agebhar1/feature/PyYAML5
fix PyYAML warning on call of `yaml.load(…)`pull/8/head
commit
4d44a056fa
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue