Skip to content
Snippets Groups Projects
Commit 68c38f8f authored by imcovangent's avatar imcovangent
Browse files

Added file existence assertion before CMDOWS parsing.

Former-commit-id: cdb93017cef3664f59486ea8e67f2ba64ae988b8
parent 86306be2
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ class CMDOWS(object): ...@@ -37,6 +37,7 @@ class CMDOWS(object):
self.XMLNS_PREFIX = 'https://bitbucket.org/imcovangent/cmdows/raw/master/schema/' self.XMLNS_PREFIX = 'https://bitbucket.org/imcovangent/cmdows/raw/master/schema/'
self.XMLNS_SUFFIX = '/cmdows.xsd' self.XMLNS_SUFFIX = '/cmdows.xsd'
if file_path: if file_path:
assert os.path.isfile(file_path), 'File {} does not seem to exist.'.format(file_path)
self.file = file_path self.file = file_path
if element is not None: if element is not None:
self.root = ElementTree(element).getroot() self.root = ElementTree(element).getroot()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment