From 947a262d90f0238608b06e8654744cc8afc26f25 Mon Sep 17 00:00:00 2001 From: "Bryan W. Weber" Date: Wed, 16 Jul 2014 16:14:48 +0000 Subject: [PATCH] [ck2cti] Allow the case where a reaction section is specified but empty --- interfaces/cython/cantera/ck2cti.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interfaces/cython/cantera/ck2cti.py b/interfaces/cython/cantera/ck2cti.py index cf4b12f61..a7b563ec2 100644 --- a/interfaces/cython/cantera/ck2cti.py +++ b/interfaces/cython/cantera/ck2cti.py @@ -1580,7 +1580,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)