From 66fb99f7937354f2d82b6bff86cb8d761610c31c Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 10 Sep 2014 22:33:02 +0000 Subject: [PATCH] [ck2cti] Allow the case where a reaction section is specified but empty Cherry-pick of trunk r3045. --- interfaces/python/ck2cti.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interfaces/python/ck2cti.py b/interfaces/python/ck2cti.py index 9a0f47c9a..6a502ed3c 100755 --- a/interfaces/python/ck2cti.py +++ b/interfaces/python/ck2cti.py @@ -1569,7 +1569,9 @@ class Parser(object): kineticsList.append(kinetics) commentsList.append(comments) - if kineticsList[0] == '' and commentsList[-1] == '': + if not kineticsList: + pass + elif kineticsList[0] == '' and commentsList[-1] == '': # True for mechanism files generated from RMG-Py kineticsList.pop(0) commentsList.pop(-1)