File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,7 +312,14 @@ def parse_sections(self, section_list):
312312 # Make sure to always use the correct odml format attribute name
313313 sec_attrs [odmlfmt .Section .map (attr )] = content
314314
315- sec = odmlfmt .Section .create (** sec_attrs )
315+ try :
316+ sec = odmlfmt .Section .create (** sec_attrs )
317+ except Exception as exc :
318+ msg = "Error trying to create Section (%s)\n %s" % (sec_attrs , str (exc ))
319+ self .error (msg )
320+ # If recovered in ignore_error mode, return empty list
321+ return odml_sections
322+
316323 for prop in sec_props :
317324 sec .append (prop )
318325
@@ -348,7 +355,11 @@ def parse_properties(self, props_list):
348355 # Make sure to always use the correct odml format attribute name
349356 prop_attrs [odmlfmt .Property .map (attr )] = content
350357
351- prop = odmlfmt .Property .create (** prop_attrs )
352- odml_props .append (prop )
358+ try :
359+ prop = odmlfmt .Property .create (** prop_attrs )
360+ odml_props .append (prop )
361+ except Exception as exc :
362+ msg = "Error trying to create Property (%s)\n %s" % (prop_attrs , str (exc ))
363+ self .error (msg )
353364
354365 return odml_props
You can’t perform that action at this time.
0 commit comments