[session] raise proper exception with get_tx is called on a closed session
Prevent attribute error on _txs
Closes #2897836
--- a/server/session.py Thu Jun 06 09:44:37 2013 +0200
+++ b/server/session.py Thu May 23 19:25:24 2013 +0200
@@ -865,6 +865,8 @@
Transaction is created if necessary"""
with self._lock: # no transaction exist with the same id
try:
+ if self.closed:
+ raise SessionClosedError('try to access connections set on a closed session %s' % self.id)
tx = self._txs[txid]
except KeyError:
rewriter = RQLRewriter(self)