diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-04-20 13:58:26 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-04-20 13:58:26 -0400 |
commit | 64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a (patch) | |
tree | a4543df175f8bf0efcd200662a9e7f00fea7bf52 /ipaserver/install/ldapupdate.py | |
parent | a9387b48e66ca93cc8323869de25fe3f777567b6 (diff) | |
download | freeipa-64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a.tar.gz freeipa-64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a.tar.xz freeipa-64fa3dd4c3a03e7a677453c9150f84ffc4e91c7a.zip |
Finish work replacing the errors module with errors2
Once this is committed we can start the process of renaming errors2 as errors.
I thought that combinig this into one commit would be more difficult to
review.
Diffstat (limited to 'ipaserver/install/ldapupdate.py')
-rw-r--r-- | ipaserver/install/ldapupdate.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index f002595d2..17b519b32 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -29,7 +29,7 @@ from ipaserver.install import installutils from ipaserver import ipaldap from ipapython import entity, ipautil from ipalib import util -from ipalib import errors, errors2 +from ipalib import errors2 import ldap import logging import krbV @@ -310,10 +310,10 @@ class LDAPUpdate: while True: try: entry = self.conn.getEntry(dn, ldap.SCOPE_BASE, "(objectclass=*)", attrlist) - except errors2.NotFound: + except errors2.NotFound, e: logging.error("Task not found: %s", dn) return - except errors.DatabaseError, e: + except errors2.DatabaseError, e: logging.error("Task lookup failure %s", e) return @@ -484,7 +484,7 @@ class LDAPUpdate: # Doesn't exist, start with the default entry entry = new_entry logging.info("New entry: %s", entry.dn) - except errors.DatabaseError: + except errors2.DatabaseError: # Doesn't exist, start with the default entry entry = new_entry logging.info("New entry, using default value: %s", entry.dn) @@ -521,10 +521,10 @@ class LDAPUpdate: if self.live_run and updated: self.conn.updateEntry(entry.dn, entry.origDataDict(), entry.toDict()) logging.info("Done") - except errors.EmptyModlist: + except errors2.EmptyModlist: logging.info("Entry already up-to-date") updated = False - except errors.DatabaseError, e: + except errors2.DatabaseError, e: logging.error("Update failed: %s", e) updated = False |