fix: replace deprecated ruamel.yaml.safe_load (#627)

This commit is contained in:
Robert Kaussow 2023-11-12 14:48:48 +01:00 committed by GitHub
parent 12f2428e9f
commit 347e074e5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,7 @@ class Config:
with open(config, encoding="utf8") as stream: with open(config, encoding="utf8") as stream:
s = stream.read() s = stream.read()
try: try:
normalized = ruamel.yaml.safe_load(s) normalized = ruamel.yaml.YAML(typ="safe", pure=True).load(s)
except (ruamel.yaml.composer.ComposerError, ruamel.yaml.scanner.ScannerError) as e: except (ruamel.yaml.composer.ComposerError, ruamel.yaml.scanner.ScannerError) as e:
message = f"{e.context} {e.problem}" message = f"{e.context} {e.problem}"
raise dockertidy.exception.ConfigError( raise dockertidy.exception.ConfigError(