From 6b32c73eee7db8647467141b683ff2e72b7f0bd8 Mon Sep 17 00:00:00 2001 From: "Bryan W. Weber" Date: Mon, 21 Nov 2016 10:09:29 -0500 Subject: [PATCH] [ck2cti] Use logging.error when a thermo entry can't be read. This matches the use when a reaction line can't be read. --- interfaces/cython/cantera/ck2cti.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/interfaces/cython/cantera/ck2cti.py b/interfaces/cython/cantera/ck2cti.py index b2e7b18f1..f48a4a205 100644 --- a/interfaces/cython/cantera/ck2cti.py +++ b/interfaces/cython/cantera/ck2cti.py @@ -1724,10 +1724,12 @@ class Parser(object): try: label, thermo, comp, note = self.readThermoEntry(thermo, TintDefault) except Exception as e: - print('Error while reading thermo entry ' - 'starting on line {0}:\n"""\n{1}\n"""'.format( - self.line_number-len(current)+1, - ''.join(current).rstrip())) + error_line_number = self.line_number - len(current) + 1 + error_entry = ''.join(current).rstrip() + logging.error( + 'Error while reading thermo entry starting on line {0}:\n' + '"""\n{1}\n"""'.format(error_line_number, error_entry) + ) raise if label not in self.speciesDict: