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

(-)a/management/univention-directory-manager-modules/listener/udm_extension.py (-1 / +4 lines)
 Lines 101-106   def handler(dn, new, old): Link Here 
101
	else:
101
	else:
102
		ud.debug(ud.LISTENER, ud.ERROR, '%s: Undetermined error: unknown objectclass: %s.' % (name, ocs))
102
		ud.debug(ud.LISTENER, ud.ERROR, '%s: Undetermined error: unknown objectclass: %s.' % (name, ocs))
103
103
104
	old_relative_filename = old.get('%sFilename' % objectclass)[0]
105
104
	if new:
106
	if new:
105
		new_version = new.get('univentionOwnedByPackageVersion', [None])[0]
107
		new_version = new.get('univentionOwnedByPackageVersion', [None])[0]
106
		if not new_version:
108
		if not new_version:
 Lines 136-141   def handler(dn, new, old): Link Here 
136
		new_relative_filename = new.get('%sFilename' % objectclass)[0]
138
		new_relative_filename = new.get('%sFilename' % objectclass)[0]
137
		listener.setuid(0)
139
		listener.setuid(0)
138
		try:
140
		try:
141
			if old_relative_filename != new_relative_filename:
142
				remove_python_file(objectclass, target_subdir, old_relative_filename)
139
			if not install_python_file(objectclass, target_subdir, new_relative_filename, new_object_data):
143
			if not install_python_file(objectclass, target_subdir, new_relative_filename, new_object_data):
140
				return
144
				return
141
			install_messagecatalog(dn, new, objectclass)
145
			install_messagecatalog(dn, new, objectclass)
 Lines 148-154   def handler(dn, new, old): Link Here 
148
	elif old:
152
	elif old:
149
153
150
		# ok, basic checks passed, handle the change
154
		# ok, basic checks passed, handle the change
151
		old_relative_filename = old.get('%sFilename' % objectclass)[0]
152
		listener.setuid(0)
155
		listener.setuid(0)
153
		try:
156
		try:
154
			remove_python_file(objectclass, target_subdir, old_relative_filename)
157
			remove_python_file(objectclass, target_subdir, old_relative_filename)

Return to bug 42862