View | Details | Raw Unified | Return to bug 32570
Collapse All | Expand All

(-)a/branches/ucs-3.2/ucs-3.2-0/base/univention-config-registry/python/univention/config_registry/handler.py (-5 / +3 lines)
 Lines 135-149   def run_script(script, arg, changes): Link Here 
135
	For each changed variable a line with the 'name of the variable', the 'old
135
	For each changed variable a line with the 'name of the variable', the 'old
136
	value', and the 'new value' are passed seperated by '@%@'.
136
	value', and the 'new value' are passed seperated by '@%@'.
137
	"""
137
	"""
138
	diff = []
138
	diff = ['@%@'.join((key, old or '', new or ''))
139
	for key, value in changes.items():
139
			for key, (old, new) in changes.items()]
140
		if value and len(value) > 1 and value[0] and value[1]:
141
			diff.append('%s@%%@%s@%%@%s\n' % (key, value[0], value[1]))
142
140
143
	cmd = script + " " + arg
141
	cmd = script + " " + arg
144
	proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
142
	proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
145
			close_fds=True)
143
			close_fds=True)
146
	proc.communicate(''.join(diff))
144
	proc.communicate('\n'.join(diff))
147
145
148
146
149
def run_module(modpath, arg, ucr, changes):
147
def run_module(modpath, arg, ucr, changes):

Return to bug 32570