mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Better LDAP error handling in ipa-client-install
This commit is contained in:
parent
384eec771d
commit
060662f320
@ -177,15 +177,11 @@ class IPADiscovery:
|
||||
return []
|
||||
|
||||
except LDAPError, err:
|
||||
#no good
|
||||
try:
|
||||
if type(err.message) == dict:
|
||||
for (k, v) in err.message.iteritems():
|
||||
logging.error("LDAP Error: %s" % v )
|
||||
else:
|
||||
logging.error("LDAP Error: "+err.message)
|
||||
except AttributeError:
|
||||
logging.error("LDAP Error: "+str(err))
|
||||
if not isinstance(err, ldap.TIMEOUT):
|
||||
logging.error("LDAP Error: %s: %s" %
|
||||
(err.args[0]['desc'], err.args[0].get('info', '')))
|
||||
else:
|
||||
logging.error("LDAP Error: timeout")
|
||||
return []
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user