This commit is contained in:
Mirco Dariol 2026-05-13 17:20:56 +02:00 committed by GitHub
commit 6301fddb4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 1 deletions

View file

@ -63,7 +63,13 @@ def main(argv: Sequence[str] | None = None) -> int:
with open(filename, encoding='UTF-8') as f:
load_fn(f)
except ruamel.yaml.YAMLError as exc:
print(exc)
print(f'{filename}: Failed to yaml parse ({exc})')
retval = 1
except UnicodeDecodeError as exc:
print(
f'{filename}: Failed to read file due to encoding error '
f'({exc})',
)
retval = 1
return retval