mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 11:16:53 +00:00
check-json: resolve TODO
This commit is contained in:
parent
66250ba9bf
commit
c11c5483d6
2 changed files with 7 additions and 2 deletions
|
|
@ -14,8 +14,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
|||
with open(filename, 'rb') as f:
|
||||
try:
|
||||
json.load(f)
|
||||
# TODO: need UnicodeDecodeError?
|
||||
except (ValueError, UnicodeDecodeError) as exc:
|
||||
except ValueError as exc:
|
||||
print(f'{filename}: Failed to json decode ({exc})')
|
||||
retval = 1
|
||||
return retval
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue