Univention Bugzilla – Attachment 6593 Details for
Bug 20044
Exceptions in Exceptionhandler werden nicht abgefangen (KeyError: 'sambaSID')
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
20044.patch (text/plain), 2.20 KB, created by
Florian Best
on 2015-01-12 18:35:15 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2015-01-12 18:35:15 CET
Size:
2.20 KB
patch
obsolete
>diff --git a/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py b/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >index 90462b3..9425981 100644 >--- a/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >+++ b/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >@@ -519,11 +519,8 @@ class base(object): > def remove(self, remove_childs=0): > '''remove object''' > >- # FIXME: the following check doesn't work anymore if we set _exists in open() >- # as an object naturally doesn't need to open to be removed; for now, let's >- # see what happens without it >- #if not self.exists(): >- # raise univention.admin.uexceptions.noObject >+ if not self.dn or not self.lo.get(self.dn): >+ raise univention.admin.uexceptions.noObject(self.dn) > > return self._remove(remove_childs) > >@@ -793,11 +790,14 @@ class simpleLdap(base): > self._ldap_post_create() > except Exception, e: > # ensure that there is no lock left >- import sys, traceback >- univention.debug.debug( univention.debug.ADMIN, univention.debug.ERROR, "Post-modify operation failed: %s" % '\n'.join( traceback.format_tb( sys.exc_info()[ 2 ] ) ) ) >- self.cancel() >- self.remove() >- raise e >+ import traceback >+ univention.debug.debug(univention.debug.ADMIN, univention.debug.ERROR, "Post-modify operation failed: %s" % (traceback.format_exc(),)) >+ try: >+ self.cancel() >+ self.remove() >+ except: >+ univention.debug.debug(univention.debug.ADMIN, univention.debug.WARN, "Post-modify: Reverting failed: %s" % (traceback.format_exc(),)) >+ raise > > self.call_udm_property_hook('hook_ldap_post_create', self) > >@@ -1014,8 +1014,6 @@ class simpleLdap(base): > self.call_udm_property_hook('hook_ldap_pre_remove', self) > > if remove_childs: >- if not self.dn: >- raise univention.admin.uexceptions.noObject > univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO,'handlers/__init__._remove() childs of base dn %s' % self.dn) > subelements = self.lo.search(base=self.dn, scope='one', attr=[]) > if subelements:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20044
: 6593