[Erp5-report] r19322 - /erp5/trunk/products/ZLDAPConnection/ZLDAP.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 15 10:25:56 CET 2008


Author: nicolas
Date: Fri Feb 15 10:25:56 2008
New Revision: 19322

URL: http://svn.erp5.org?rev=19322&view=rev
Log:
revert r19313 where usage of _ping is too slow
Add method to get New Connection

Modified:
    erp5/trunk/products/ZLDAPConnection/ZLDAP.py

Modified: erp5/trunk/products/ZLDAPConnection/ZLDAP.py
URL: http://svn.erp5.org/erp5/trunk/products/ZLDAPConnection/ZLDAP.py?rev=19322&r1=19321&r2=19322&view=diff
==============================================================================
--- erp5/trunk/products/ZLDAPConnection/ZLDAP.py (original)
+++ erp5/trunk/products/ZLDAPConnection/ZLDAP.py Fri Feb 15 10:25:56 2008
@@ -358,21 +358,26 @@
     ### connection checking stuff
 
     def _connection(self):
-        if self.openc:
+        if self.getOpenConnection():
             if not self.isOpen(): self._open()
             return self._v_conn
         else:
             raise ConnectionError, 'Connection Closed'
 
     GetConnection=_connection
+
+    def getForcedConnection(self):
+        if self.getOpenConnection():
+            self._open()
+            return self._v_conn
+        else:
+            raise ConnectionError, 'Connection Closed'
 
     def isOpen(self):
         " quickly checks to see if the connection's open "
         if getattr(aq_base(self), '_v_conn', None) is None:
             self._v_conn = None
         if self._v_conn is None or not self.shouldBeOpen():
-            return 0
-        elif not self.__ping():
             return 0
         else:
             return 1




More information about the Erp5-report mailing list