Remove fallback to yaml.load

* yaml.full_load was added in PyYAML 5.1, required is >=5.4
pull/98/head
Marc Mueller 2022-01-29 14:13:21 +01:00 zatwierdzone przez Florian Ludwig
rodzic 10c6575f02
commit 3f05d35483
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -40,11 +40,7 @@ def read_yaml_config(config_file: str) -> dict:
config = None
try:
with open(config_file) as stream:
config = (
yaml.full_load(stream)
if hasattr(yaml, "full_load")
else yaml.load(stream)
)
config = yaml.full_load(stream)
except yaml.YAMLError as exc:
logger.error("Invalid config_file %s: %r", config_file, exc)
return config