From 6590de030c284c73ec7043d2baabef5ac36aa917 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 10 May 2013 08:28:52 -0500 Subject: [PATCH] Issue 1481:error using do_connect=False parameter in DAL creation with mongodb and couchdb is fixed, thanks Alan --- VERSION | 2 +- gluon/dal.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 16c9ba09..b0b9ab29 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/dal.py b/gluon/dal.py index caee8e9f..276ba907 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -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()