summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-05-13 16:52:30 -0400
committerRob Crittenden <rcritten@redhat.com>2009-05-19 09:48:35 -0400
commit9147f0da69b9f0b4181696a9a716a687674ccf64 (patch)
treed1a5c29164da50fe745b7b5db770221afe1cfbb4 /ipaserver
parent87480b7bdea7cfe99d0c3d964fd65b82dbaf6a6c (diff)
downloadfreeipa-9147f0da69b9f0b4181696a9a716a687674ccf64.tar.gz
freeipa-9147f0da69b9f0b4181696a9a716a687674ccf64.tar.xz
freeipa-9147f0da69b9f0b4181696a9a716a687674ccf64.zip
Don't pass non-existent arguments to _handle_errors()
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/ipaldap.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py
index d60e23fd6..3d0b321e0 100644
--- a/ipaserver/ipaldap.py
+++ b/ipaserver/ipaldap.py
@@ -297,7 +297,7 @@ class IPAdmin(SimpleLDAPObject):
# re-raise the error so we can handle it
raise e
except ldap.NO_SUCH_OBJECT, e:
- args = kw.get('args', '')
+ args = kw.get('args', ["entry not found"])
raise errors.NotFound(reason=notfound(args))
except ldap.ALREADY_EXISTS, e:
raise errors.DuplicateEntry()
@@ -459,8 +459,7 @@ class IPAdmin(SimpleLDAPObject):
self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl)
self.modrdn_s(dn, newrdn, delold=1)
except ldap.LDAPError, e:
- kw = {'args': args}
- self.__handle_errors(e, **kw)
+ self.__handle_errors(e, **{})
return True
def updateEntry(self,dn,oldentry,newentry):
@@ -479,8 +478,7 @@ class IPAdmin(SimpleLDAPObject):
self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl)
self.modify_s(dn, modlist)
except ldap.LDAPError, e:
- kw = {'args': args}
- self.__handle_errors(e, **kw)
+ self.__handle_errors(e, **{})
return True
def generateModList(self, old_entry, new_entry):
@@ -538,8 +536,7 @@ class IPAdmin(SimpleLDAPObject):
self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl)
self.modify_s(dn, modlist)
except ldap.LDAPError, e:
- kw = {'args': args}
- self.__handle_errors(e, **kw)
+ self.__handle_errors(e, **{})
return True
def deleteEntry(self,*args):
@@ -571,8 +568,7 @@ class IPAdmin(SimpleLDAPObject):
self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl)
self.passwd_s(dn, oldpass, newpass)
except ldap.LDAPError, e:
- kw = {'args': args}
- self.__handle_errors(e, **kw)
+ self.__handle_errors(e, **{})
return True
def __wrapmethods(self):