##// END OF EJS Templates
Distinguish errors during read/write
Jessica B. Hamrick -
Show More
@@ -89,7 +89,7 b' def reads_json(nbjson, **kwargs):'
89 num_errors = validate(nb_current)
89 num_errors = validate(nb_current)
90 if num_errors > 0:
90 if num_errors > 0:
91 logger.error(
91 logger.error(
92 "Notebook JSON is invalid (%d errors detected)",
92 "Notebook JSON is invalid (%d errors detected during read)",
93 num_errors)
93 num_errors)
94 return nb_current
94 return nb_current
95
95
@@ -102,7 +102,7 b' def writes_json(nb, **kwargs):'
102 num_errors = validate(nb)
102 num_errors = validate(nb)
103 if num_errors > 0:
103 if num_errors > 0:
104 logger.error(
104 logger.error(
105 "Notebook JSON is invalid (%d errors detected)",
105 "Notebook JSON is invalid (%d errors detected during write)",
106 num_errors)
106 num_errors)
107 nbjson = versions[current_nbformat].writes_json(nb, **kwargs)
107 nbjson = versions[current_nbformat].writes_json(nb, **kwargs)
108 return nbjson
108 return nbjson
General Comments 0
You need to be logged in to leave comments. Login now