Bug #22427: Fix recursive template evaluation --- python/univention/config_registry.py (Revision 24117) +++ python/univention/config_registry.py (Arbeitskopie) @@ -353,9 +353,9 @@ except StopIteration: break - while 1: - i = execute_token.finditer(template) - try: + i = execute_token.finditer(template) + try: + while True: start = i.next() end = i.next() @@ -372,10 +372,9 @@ value=child_stdout.read() child_stdout.close() template = template[:start.start()]+value+template[end.end():] + except StopIteration: + pass - except StopIteration: - break - return template def runScript(script, arg, changes):