diff --git a/tools/openClosedUniGenerator.py b/tools/openClosedUniGenerator.py index 9efa739b..44377afe 100644 --- a/tools/openClosedUniGenerator.py +++ b/tools/openClosedUniGenerator.py @@ -13,19 +13,13 @@ for line in text.splitlines(): line = line.split(";") value, name, category = line[:3] - if category in ("Ps", "Pe", "Pi", "Pf"): - if openValue is None: + if category in ("Ps", "Pi"): #assert category in ("Ps", "Pi") openValue = (value, name, category) - else: - #assert category in ("Pe", "Pf") - if category not in ("Pe", "Pf"): - result.append("#%s;%s;%s" % (value, name, category)) - result.append("") - else: - result.append("%s;%s;%s" % openValue) - result.append("%s;%s;%s" % (value, name, category)) - result.append("") - openValue = None + elif category in ("Pe", "Pf") and openValue is not None: + result.append("%s;%s;%s" % openValue) + result.append("%s;%s;%s" % (value, name, category)) + result.append("") + openValue = None print("\n".join(result))