From a0b585fc2503ca73da87ea31cb25abb336b56021 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 5 Jul 2012 21:32:09 -0500 Subject: [PATCH] db.close(). thanks nick name --- VERSION | 2 +- gluon/dal.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 07d23e36..e75c1d37 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-05 21:17:15) dev +Version 2.00.0 (2012-07-05 21:32:06) dev diff --git a/gluon/dal.py b/gluon/dal.py index a73ba34c..dda43717 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -6891,6 +6891,11 @@ def index(): def rollback(self): self._adapter.rollback() + def close(self): + if self._adapter in thread.instances: + thread.instances.remove(self._adapter) + self._adapter.close() + def executesql(self, query, placeholders=None, as_dict=False): """ placeholders is optional and will always be None when using DAL.