Support checking unicode TOML

This commit is contained in:
Max Rozentsveyg
2020-05-16 20:49:10 -04:00
parent 2322277afd
commit 8febacdfed
2 changed files with 10 additions and 4 deletions

View File

@ -13,8 +13,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
retval = 0
for filename in args.filenames:
try:
with open(filename) as f:
toml.load(f)
toml.load(filename)
except toml.TomlDecodeError as exc:
print(f'{filename}: {exc}')
retval = 1