- Timestamp:
- Dec 30, 2013 11:31:40 AM (11 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- be577e7
- Parents:
- 19b628f
- Location:
- src/sans/dataloader/readers
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/dataloader/readers/xml_reader.py
reda8972 r17a25d4 17 17 18 18 class XMLreader(): 19 20 19 21 20 def __init__(self, xml = None, schema = None, root = None): … … 39 38 self.xmldoc = etree.parse(self.xml, parser = parser) 40 39 else: 41 raise ValidationError(self, self.findInvalidXML())40 raise etree.ValidationError(self, self.findInvalidXML()) 42 41 return self.xmldoc 43 42 … … 47 46 self.xmldoc = etree.parse(self.xml, parser = parser) 48 47 self.xmlroot = self.xmldoc.getroot() 49 except Exception as e:48 except Exception: 50 49 ##!TODO: raise exception if no xml is passed to this function 51 50 print "No xml file was found!" … … 55 54 self.schema = schema 56 55 self.schemadoc = etree.parse(self.schema, parser = parser) 57 except Exception as e:56 except Exception: 58 57 ##!TODO: raise exception if no schema is passed to this function 59 58 print "No schema file was found!" … … 89 88 self.setXMLFile(self.xml) 90 89 self.setSchema(self.schema) 90
Note: See TracChangeset
for help on using the changeset viewer.