|
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 |
|
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] |