Skip to content

Commit

Permalink
ValueError is more generic than JSONDecodeError #141
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Dec 15, 2018
1 parent e0db5f8 commit 830e0e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jupytext/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def convert_notebook_files(nb_files, fmt, input_format=None, output=None, pre_co
if update_metadata:
try:
updated_metadata = json.loads(update_metadata)
except json.JSONDecodeError as exception:
except ValueError as exception:
raise ValueError("Could not parse --update-metadata {}. JSONDecodeError: {}".
format(update_metadata, str(exception)))
recursive_update(notebook.metadata, updated_metadata)
Expand Down

0 comments on commit 830e0e5

Please sign in to comment.