From 3e6d4866222753e971fd269eba582df71cb6fd11 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Thu, 14 Feb 2008 15:18:43 +0000 Subject: [PATCH] Use costless method to test connection validity git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19314 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZLDAPConnection/ZLDAP.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/product/ZLDAPConnection/ZLDAP.py b/product/ZLDAPConnection/ZLDAP.py index a5435adf2a..902f317ac2 100644 --- a/product/ZLDAPConnection/ZLDAP.py +++ b/product/ZLDAPConnection/ZLDAP.py @@ -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() -- 2.30.9