Skip to content

Commit 6407cb0

Browse files
authored
Merge pull request #147 from chrismcmacken/master
Make sure that the connection is closed
2 parents 9a0415b + 197b002 commit 6407cb0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

beaker/ext/database.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ def do_open(self, flags, replace):
117117
return
118118

119119
cache = self.cache
120-
result = sa.select([cache.c.data],
120+
result_proxy = sa.select([cache.c.data],
121121
cache.c.namespace == self.namespace
122-
).execute().fetchone()
122+
).execute()
123+
result = result_proxy.fetchone()
124+
result_proxy.close()
125+
123126
if not result:
124127
self._is_new = True
125128
self.hash = {}

0 commit comments

Comments
 (0)