Issue 1481:error using do_connect=False parameter in DAL creation with mongodb and couchdb is fixed, thanks Alan

This commit is contained in:
mdipierro
2013-05-10 08:28:52 -05:00
parent 714fcc5202
commit 6590de030c
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.6-stable+timestamp.2013.05.10.08.25.20
Version 2.4.6-stable+timestamp.2013.05.10.08.28.07
+5 -1
View File
@@ -585,11 +585,15 @@ class ConnectionPool(object):
if the connection is not active (closed by db server) it will loop
if not self.pool_size or no active connections in pool makes a new one
"""
if getattr(self,'connection',None) != None:
if getattr(self,'connection', None) != None:
return
if f is None:
f = self.connector
if not hasattr(self, "driver") or self.driver is None:
LOGGER.debug("Skipping connection since there's no driver")
return
if not self.pool_size:
self.connection = f()
self.cursor = cursor and self.connection.cursor()