diff --git a/interfaces/python/ck2cti.py b/interfaces/python/ck2cti.py index 9dd594bdb..a4b879e05 100755 --- a/interfaces/python/ck2cti.py +++ b/interfaces/python/ck2cti.py @@ -1796,6 +1796,8 @@ duplicate transport data) to be ignored. if permissive is not None: self.warning_as_error = not permissive + if not os.path.exists(inputFile): + raise IOError('Missing input file: {0!r}'.format(inputFile)) try: # Read input mechanism files self.loadChemkinFile(inputFile) @@ -1805,6 +1807,8 @@ duplicate transport data) to be ignored. raise if thermoFile: + if not os.path.exists(thermoFile): + raise IOError('Missing thermo file: {0!r}'.format(thermoFile)) try: self.loadChemkinFile(thermoFile) except Exception: @@ -1813,6 +1817,8 @@ duplicate transport data) to be ignored. raise if transportFile: + if not os.path.exists(transportFile): + raise IOError('Missing transport file: {0!r}'.format(transportFile)) lines = open(transportFile, 'rU').readlines() self.parseTransportData(lines)