From fc8ac693726ec33b5c0924f9b8ff5d663705a5a3 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 5 Dec 2008 15:31:18 -0500 Subject: Port plugins to use the new output_for_cli() argument list Fix some errors uncovered by the nosetests --- ipa_server/ipaldap.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ipa_server/ipaldap.py') diff --git a/ipa_server/ipaldap.py b/ipa_server/ipaldap.py index 7cfd6c41..215ef683 100644 --- a/ipa_server/ipaldap.py +++ b/ipa_server/ipaldap.py @@ -375,7 +375,7 @@ class IPAdmin(SimpleLDAPObject): except ldap.ALREADY_EXISTS, e: raise errors.DuplicateEntry, "Entry already exists" except ldap.LDAPError, e: - raise e + raise DatabaseError, e return True def updateRDN(self, dn, newrdn): @@ -392,7 +392,7 @@ class IPAdmin(SimpleLDAPObject): self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl) self.modrdn_s(dn, newrdn, delold=1) except ldap.LDAPError, e: - raise e + raise DatabaseError, e return True def updateEntry(self,dn,oldentry,newentry): @@ -474,7 +474,7 @@ class IPAdmin(SimpleLDAPObject): self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl) self.modify_s(dn, modlist) except ldap.LDAPError, e: - raise e + raise DatabaseError, e return True def deleteEntry(self,*args): @@ -486,8 +486,10 @@ class IPAdmin(SimpleLDAPObject): if sctrl is not None: self.set_option(ldap.OPT_SERVER_CONTROLS, sctrl) self.delete_s(*args) + except ldap.INSUFFICIENT_ACCESS, e: + raise errors.InsufficientAccess, e except ldap.LDAPError, e: - raise e + raise errors.DatabaseError, e return True def modifyPassword(self,dn,oldpass,newpass): -- cgit