From d1525cf6ecf300d2650c8cad6b410af56da11f1e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 21 Aug 2013 04:29:39 -0500 Subject: [PATCH] adapter.connect = None after adapter.close_connection --- VERSION | 2 +- gluon/dal.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index ada9fdbe..59dc1a2c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.08.21.02.52.57 +Version 2.6.0-development+timestamp.2013.08.21.04.28.27 diff --git a/gluon/dal.py b/gluon/dal.py index d1edcd62..f21f19c5 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1778,13 +1778,18 @@ class BaseAdapter(ConnectionPool): return list(tables) def commit(self): - if self.connection: return self.connection.commit() + if self.connection: + return self.connection.commit() def rollback(self): - if self.connection: return self.connection.rollback() + if self.connection: + return self.connection.rollback() def close_connection(self): - if self.connection: return self.connection.close() + if self.connection: + r = self.connection.close() + self.connection = None + return r def distributed_transaction_begin(self, key): return