From 68c38f8fb9bb4704aa9a8ea74061f917d5fc0e30 Mon Sep 17 00:00:00 2001 From: imcovangent <I.vanGent@tudelft.nl> Date: Tue, 3 Apr 2018 18:28:11 +0200 Subject: [PATCH] Added file existence assertion before CMDOWS parsing. Former-commit-id: cdb93017cef3664f59486ea8e67f2ba64ae988b8 --- kadmos/cmdows/cmdows.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kadmos/cmdows/cmdows.py b/kadmos/cmdows/cmdows.py index d1ef5e03c..f07e35b57 100644 --- a/kadmos/cmdows/cmdows.py +++ b/kadmos/cmdows/cmdows.py @@ -37,6 +37,7 @@ class CMDOWS(object): self.XMLNS_PREFIX = 'https://bitbucket.org/imcovangent/cmdows/raw/master/schema/' self.XMLNS_SUFFIX = '/cmdows.xsd' if file_path: + assert os.path.isfile(file_path), 'File {} does not seem to exist.'.format(file_path) self.file = file_path if element is not None: self.root = ElementTree(element).getroot() -- GitLab