summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/krbinstance.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-21 04:56:50 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:44 +0100
commitaa6fb75637f1352fb0e90bccaf30f5b67caf7f0e (patch)
tree9457d8b83e452fa91d59c4a254c694da2bfa5b7a /ipaserver/install/krbinstance.py
parent66c7fd1323619a99c48eb9babe4cbe7f48dca303 (diff)
downloadfreeipa-aa6fb75637f1352fb0e90bccaf30f5b67caf7f0e.tar.gz
freeipa-aa6fb75637f1352fb0e90bccaf30f5b67caf7f0e.tar.xz
freeipa-aa6fb75637f1352fb0e90bccaf30f5b67caf7f0e.zip
Replace add_s and delete_s by their newer equivalents
Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
Diffstat (limited to 'ipaserver/install/krbinstance.py')
-rw-r--r--ipaserver/install/krbinstance.py16
1 files changed, 8 insertions, 8 deletions
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(