View | Details | Raw Unified | Return to bug 41294 | Differences between
and this patch

Collapse All | Expand All

(-)a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py (-3 / +4 lines)
 Lines 725-735   def _create(self): Link Here 
725
725
726
		univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO, "create object with dn: %s" % (self.dn,))
726
		univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO, "create object with dn: %s" % (self.dn,))
727
		univention.debug.debug(univention.debug.ADMIN, 99, 'Create dn=%r;\naddlist=%r;' % (self.dn, al))
727
		univention.debug.debug(univention.debug.ADMIN, 99, 'Create dn=%r;\naddlist=%r;' % (self.dn, al))
728
		self.lo.add(self.dn, al)
729
		self._exists = True
730
728
731
		# if anything goes wrong we need to remove the already created object, otherwise we run into 'already exists' errors
729
		# if anything goes wrong we need to remove the already created object, otherwise we run into 'already exists' errors
732
		try:
730
		try:
731
			self.lo.add(self.dn, al)
732
			self._exists = True
733
			self._ldap_post_create()
733
			self._ldap_post_create()
734
		except:
734
		except:
735
			# ensure that there is no lock left
735
			# ensure that there is no lock left
 Lines 741-747   def _create(self): Link Here 
741
			except:
741
			except:
742
				univention.debug.debug(univention.debug.ADMIN, univention.debug.ERROR, "Post-create: cancel() failed: %s" % (traceback.format_exc(),))
742
				univention.debug.debug(univention.debug.ADMIN, univention.debug.ERROR, "Post-create: cancel() failed: %s" % (traceback.format_exc(),))
743
			try:
743
			try:
744
				self.remove()
744
				if self._exists:
745
					self.remove()
745
			except:
746
			except:
746
				univention.debug.debug(univention.debug.ADMIN, univention.debug.ERROR, "Post-create: remove() failed: %s" % (traceback.format_exc(),))
747
				univention.debug.debug(univention.debug.ADMIN, univention.debug.ERROR, "Post-create: remove() failed: %s" % (traceback.format_exc(),))
747
			raise exc[0], exc[1], exc[2]
748
			raise exc[0], exc[1], exc[2]

Return to bug 41294