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

(-)a/management/univention-directory-manager-modules/modules/univention/admin/handlers/policies/registry.py (-2 / +2 lines)
 Lines 122-128   def _post_unmap(self, info, values): Link Here 
122
		for key, value in values.items():
122
		for key, value in values.items():
123
			if key.startswith('univentionRegistry;entry-hex-'):
123
			if key.startswith('univentionRegistry;entry-hex-'):
124
				key_name = key.split('univentionRegistry;entry-hex-', 1)[1].decode('hex')
124
				key_name = key.split('univentionRegistry;entry-hex-', 1)[1].decode('hex')
125
				info['registry'].append((key_name, values[key][0].strip()))
125
				info['registry'].append([key_name, values[key][0].strip()])
126
126
127
		info['registry'].sort()
127
		info['registry'].sort()
128
128
 Lines 137-143   def _post_map(self, modlist, diff): Link Here 
137
					raise univention.admin.uexceptions.valueInvalidSyntax(_('Duplicated variables not allowed: %s') % (', '.join(map(repr, duplicated))))
137
					raise univention.admin.uexceptions.valueInvalidSyntax(_('Duplicated variables not allowed: %s') % (', '.join(map(repr, duplicated))))
138
138
139
				old_dict = dict(old)
139
				old_dict = dict(old)
140
				new_dict = dict((k.strip(), v) for k, v in new)  # strip leading and trailing whitespace in variable names
140
				new_dict = dict([k.strip(), v] for k, v in new)  # strip leading and trailing whitespace in variable names
141
141
142
				for var, value in old_dict.items():
142
				for var, value in old_dict.items():
143
					attr_name = 'univentionRegistry;entry-hex-%s' % var.encode('hex')
143
					attr_name = 'univentionRegistry;entry-hex-%s' % var.encode('hex')

Return to bug 43562