From ce824608c0eec7658a427528013e2ad693e0f35c Mon Sep 17 00:00:00 2001 From: cyyc1 <114281716+cyyc1@users.noreply.github.com> Date: Thu, 6 Oct 2022 01:24:59 -0700 Subject: [PATCH] Add exception message --- pre_commit_hooks/string_fixer_for_jupyter_notebooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit_hooks/string_fixer_for_jupyter_notebooks.py b/pre_commit_hooks/string_fixer_for_jupyter_notebooks.py index ab4be97..1ab47f4 100644 --- a/pre_commit_hooks/string_fixer_for_jupyter_notebooks.py +++ b/pre_commit_hooks/string_fixer_for_jupyter_notebooks.py @@ -16,7 +16,7 @@ def fix_strings(filename: str) -> int: with open(filename) as f: notebook_contents = json.load(f) except json.JSONDecodeError as exc: - print(f'{filename}: Failed to load') + print(f'{filename}: Failed to load ({exc})') return 1 else: cells = notebook_contents['cells']