# HG changeset patch # User pierre-yves # Date 1369329924 -7200 # Node ID dcd8aa47adcef682236dc2d219549e61cadf184b # Parent a90a988005788c1041f6dc032abb42e368f51a4f [session] raise proper exception with get_tx is called on a closed session Prevent attribute error on _txs Closes #2897836 diff -r a90a98800578 -r dcd8aa47adce server/session.py --- 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)