Show More
@@ -40,7 +40,8 b' def parse_json(s, **kwargs):' | |||||
40 | try: |
|
40 | try: | |
41 | nb_dict = json.loads(s, **kwargs) |
|
41 | nb_dict = json.loads(s, **kwargs) | |
42 | except ValueError: |
|
42 | except ValueError: | |
43 | raise NotJSONError("Notebook does not appear to be JSON: %r" % s[:16]) |
|
43 | # Limit the error message to 80 characters. Display whatever JSON will fit. | |
|
44 | raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...") | |||
44 | return nb_dict |
|
45 | return nb_dict | |
45 |
|
46 | |||
46 | # High level API |
|
47 | # High level API |
General Comments 0
You need to be logged in to leave comments.
Login now