From 3f05d35483e22afdc783bade995b5e122f6e33ee Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 29 Jan 2022 14:13:21 +0100 Subject: [PATCH] Remove fallback to yaml.load * yaml.full_load was added in PyYAML 5.1, required is >=5.4 --- amqtt/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/amqtt/utils.py b/amqtt/utils.py index 5e51640..08f4a71 100644 --- a/amqtt/utils.py +++ b/amqtt/utils.py @@ -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