Univention Bugzilla – Attachment 5426 Details for
Bug 32570
UCR script handler inconsistently called
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Change implementation to always call script handler
32570_ucr-script-handler.diff (text/plain), 1.15 KB, created by
Philipp Hahn
on 2013-09-12 09:55 CEST
(
hide
)
Description:
Change implementation to always call script handler
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2013-09-12 09:55 CEST
Size:
1.15 KB
patch
obsolete
>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):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 32570
: 5426