예제 #1
0
 def _parse_spec(self, path):
     if not os.path.isfile(path):
         raise DataError("Spec file '%s' does not exist." % path)
     with ETSource(path) as source:
         root = ET.parse(source).getroot()
     if root.tag != 'keywordspec':
         raise DataError("Invalid spec file '%s'." % path)
     return root
예제 #2
0
 def _parse_spec(self, path):
     if not os.path.isfile(path):
         raise DataError("Spec file '%s' does not exist." % path)
     with ETSource(path) as source:
         root = ET.parse(source).getroot()
     if root.tag != 'keywordspec':
         raise DataError("Invalid spec file '%s'." % path)
     return root