mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Handle exceptions more gracefully on systems with python-ldap 2.2.0
442136
This commit is contained in:
parent
ce3f79e51c
commit
ff3ca61f73
@ -178,11 +178,14 @@ class IPADiscovery:
|
||||
|
||||
except LDAPError, err:
|
||||
#no good
|
||||
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)
|
||||
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))
|
||||
return []
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user