From: Philipp Gesang Date: Tue, 24 Jul 2018 13:46:54 +0000 (+0200) Subject: fix cnfvar crash on end inside child vars X-Git-Tag: v1.4~18^2~5 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=023740e4cb55b248e6087c6d96e62d5ced9dc0b7;p=pyi2ncommon fix cnfvar crash on end inside child vars The recursive call to parse_cnf_children() may also return None if it hit EOF. --- diff --git a/src/cnfvar.py b/src/cnfvar.py index 7ab5d93..483a96f 100644 --- a/src/cnfvar.py +++ b/src/cnfvar.py @@ -485,6 +485,8 @@ def parse_cnf_children(state, parent): # parent is further down in hierarchy -> new level (state, children, new_parent) = \ parse_cnf_children (state, new_parent) + if state is None: + break cnf_line["children"] = children current = get(state) new_parent = get_parent(current)