diff --git a/intelmq/lib/utils.py b/intelmq/lib/utils.py index 42d551ad9..d8a4e8d13 100644 --- a/intelmq/lib/utils.py +++ b/intelmq/lib/utils.py @@ -219,7 +219,7 @@ def load_configuration(configuration_filepath: str) -> dict: if os.path.exists(configuration_filepath): with open(configuration_filepath) as fpconfig: try: - config = YAML(typ="unsafe", pure=True).load(fpconfig) + config = YAML(pure=True).load(fpconfig) except ScannerError as exc: if "found character '\\t' that cannot start any token" in exc.problem: fpconfig.seek(0) @@ -260,7 +260,7 @@ def write_configuration(configuration_filepath: str, pathlib.Path(configuration_filepath + '.bak').write_text(config.read_text()) with open(configuration_filepath, 'w') as handle: if useyaml: - YAML(typ="unsafe", pure=True).dump(content, handle) + YAML(pure=True).dump(content, handle) else: json.dump(content, fp=handle, indent=4, sort_keys=True,