Skip to content

Commit

Permalink
Remove fallback to yaml.load
Browse files Browse the repository at this point in the history
* yaml.full_load was added in PyYAML 5.1, required is >=5.4
  • Loading branch information
cdce8p authored and FlorianLudwig committed Jan 30, 2022
1 parent 10c6575 commit 3f05d35
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions amqtt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3f05d35

Please # to comment.