From 664248d5b846321f61e0776b646cca82c5a17884 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 31 Jan 2013 08:26:38 -0500 Subject: 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 --- ipalib/errors.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ipalib/errors.py') 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*). -- cgit