From 126dc9e04ca5a2a547c419b834e34a9014270656 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 30 Mar 2012 23:47:24 +0000 Subject: [PATCH] Print error message when missing species thermo --- interfaces/python/ck2cti.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interfaces/python/ck2cti.py b/interfaces/python/ck2cti.py index 134436d6a..af93cc9f9 100644 --- a/interfaces/python/ck2cti.py +++ b/interfaces/python/ck2cti.py @@ -81,6 +81,7 @@ class Species(object): self.thermo = None self.transport = None self.note = None + self.composition = None def __str__(self): return self.label @@ -1648,6 +1649,8 @@ def writeCTI(species, for s in species: if not s.transport: haveTransport = False + if s.composition is None: + raise ChemkinError('No thermo data found for species: {0!r}'.format(s.label)) elements.update(s.composition) speciesNameLength = max(speciesNameLength, len(s.label))