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( ...@@ -380,8 +380,7 @@ class ZLDAPConnection(
def __ping(self): def __ping(self):
" more expensive check on the connection and validity of conn " " more expensive check on the connection and validity of conn "
try: try:
self._connection().search_s(self.dn,ldap.SCOPE_BASE, self._connection().whoami_s()
'objectclass=*')
return 1 return 1
except: except:
self._close() 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