Merge pull request #186 from agebhar1/feature/PyYAML5

fix PyYAML warning on call of `yaml.load(…)`
pull/8/head
Nicolas 2019-07-28 12:29:12 +02:00 zatwierdzone przez GitHub
commit 4d44a056fa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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