diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-config-registry/python/univention/config_registry/handler.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-config-registry/python/univention/config_registry/handler.py index 3e2064a..d44cf0f 100644 --- a/branches/ucs-3.2/ucs-3.2-0/base/univention-config-registry/python/univention/config_registry/handler.py +++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-config-registry/python/univention/config_registry/handler.py @@ -135,15 +135,13 @@ def run_script(script, arg, changes): For each changed variable a line with the 'name of the variable', the 'old value', and the 'new value' are passed seperated by '@%@'. """ - diff = [] - for key, value in changes.items(): - if value and len(value) > 1 and value[0] and value[1]: - diff.append('%s@%%@%s@%%@%s\n' % (key, value[0], value[1])) + diff = ['@%@'.join((key, old or '', new or '')) + for key, (old, new) in changes.items()] cmd = script + " " + arg proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, close_fds=True) - proc.communicate(''.join(diff)) + proc.communicate('\n'.join(diff)) def run_module(modpath, arg, ucr, changes):