summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-31 08:26:38 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-13 12:36:33 +0100
commit664248d5b846321f61e0776b646cca82c5a17884 (patch)
tree63547fb882cfc17b82284042da8a3073bc42f8bd /ipalib/errors.py
parenta0242334feb3da01430f517806768965dabe92c2 (diff)
downloadfreeipa-664248d5b846321f61e0776b646cca82c5a17884.tar.gz
freeipa-664248d5b846321f61e0776b646cca82c5a17884.tar.xz
freeipa-664248d5b846321f61e0776b646cca82c5a17884.zip
Use IPAdmin rather than raw python-ldap in migration.py and ipadiscovery.py
These used ipautil.get_ipa_basedn. Convert that to use the new wrappers. Beef up the error handling in ipaldap to accomodate the errors we catch in the server discovery. Add a DatabaseTimeout exception to errors.py. These were the last uses of ipautil.convert_ldap_error, remove that. https://fedorahosted.org/freeipa/ticket/3487 https://fedorahosted.org/freeipa/ticket/3446
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 15a228ea9..658c8cbc2 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -1481,6 +1481,22 @@ class NotAllowedOnNonLeaf(ExecutionError):
format = _('Not allowed on non-leaf entry')
+class DatabaseTimeout(DatabaseError):
+ """
+ **4211** Raised when an LDAP call times out
+
+ For example:
+
+ >>> raise DatabaseTimeout()
+ Traceback (most recent call last):
+ ...
+ DatabaseTimeout: LDAP timeout
+ """
+
+ errno = 4211
+ format = _('LDAP timeout')
+
+
class CertificateError(ExecutionError):
"""
**4300** Base class for Certificate execution errors (*4300 - 4399*).