matrix_templates/units.py: add some comments

... to help understand the slightly cryptic python incantation.
pull/977/head
Richard van der Hoff 8 years ago
parent 4875be05ce
commit c0e5f3c3ca

@ -172,9 +172,10 @@ def get_json_schema_object_fields(obj, enforce_title=False,
except Exception, e:
e2 = Exception("Error reading property %s.%s: %s" %
(obj_title, key_name, str(e)))
# throw the new exception with the old stack trace, so that
# we don't lose information about where the error occurred.
raise e2, None, sys.exc_info()[2]
tables.insert(0, {
"title": obj_title,
"rows": first_table_rows,
@ -639,6 +640,8 @@ class MatrixUnits(Units):
except Exception, e:
e2 = Exception("Error reading event schema "+filepath+": "+
str(e))
# throw the new exception with the old stack trace, so that
# we don't lose information about where the error occurred.
raise e2, None, sys.exc_info()[2]
return schemata

Loading…
Cancel
Save