Commit 3e6d4866 authored by Nicolas Delaby's avatar Nicolas Delaby

Use costless method to test connection validity

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19314 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f6624707
......@@ -380,8 +380,7 @@ class ZLDAPConnection(
def __ping(self):
" more expensive check on the connection and validity of conn "
try:
self._connection().search_s(self.dn,ldap.SCOPE_BASE,
'objectclass=*')
self._connection().whoami_s()
return 1
except:
self._close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment