diff options
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/cainstance.py | 2 | ||||
-rw-r--r-- | ipaserver/install/krbinstance.py | 16 | ||||
-rw-r--r-- | ipaserver/install/replication.py | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 16a133d94..e26dbaa6c 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -1080,7 +1080,7 @@ class CAInstance(service.Service): DN(('CN', 'IPA RA'), self.subject_base))), ] - conn.add_s(entry_dn, entry) + conn.add_entry(entry_dn, entry) dn = DN(('cn', 'Certificate Manager Agents'), ('ou', 'groups'), self.basedn) modlist = [(0, 'uniqueMember', '%s' % entry_dn)] diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py index 4040bd625..d3bee8f45 100644 --- a/ipaserver/install/krbinstance.py +++ b/ipaserver/install/krbinstance.py @@ -38,7 +38,6 @@ from ipaserver.install import replication from ipaserver.install import dsinstance import ldap -from ldap import LDAPError import pyasn1.codec.ber.decoder import struct @@ -265,13 +264,14 @@ class KrbInstance(service.Service): "(objectclass=nsSaslMapping)") for r in res: try: - self.admin_conn.delete_s(r.dn) - except LDAPError, e: - root_logger.critical("Error during SASL mapping removal: %s" % str(e)) - raise e - except LDAPError, e: - root_logger.critical("Error while enumerating SASL mappings %s" % str(e)) - raise e + self.admin_conn.delete_entry(r.dn) + except Exception, e: + root_logger.critical( + "Error during SASL mapping removal: %s", e) + raise + except Exception, e: + root_logger.critical("Error while enumerating SASL mappings %s", e) + raise entry = self.admin_conn.make_entry( DN( diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index a9d3d9c58..c28fa8902 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -306,8 +306,8 @@ class ReplicationManager(object): def delete_replication_manager(self, conn, dn=REPL_MAN_DN): assert isinstance(dn, DN) try: - conn.delete_s(dn) - except ldap.NO_SUCH_OBJECT: + conn.delete_entry(dn) + except errors.NotFound: pass def get_replica_type(self, master=True): @@ -680,12 +680,12 @@ class ReplicationManager(object): # Finally remove the temporary replication manager user try: - a.delete_s(self.repl_man_dn) - except ldap.NO_SUCH_OBJECT: + a.delete_entry(self.repl_man_dn) + except errors.NotFound: pass try: - b.delete_s(self.repl_man_dn) - except ldap.NO_SUCH_OBJECT: + b.delete_entry(self.repl_man_dn) + except errors.NotFound: pass def delete_agreement(self, hostname, dn=None): |