server/session.py
changeset 8996 dcd8aa47adce
parent 8934 48a6e6b88b16
child 8999 81a5d57d9230
equal deleted inserted replaced
8995:a90a98800578 8996:dcd8aa47adce
   863         """return the <txid> transaction attached to this session
   863         """return the <txid> transaction attached to this session
   864 
   864 
   865         Transaction is created if necessary"""
   865         Transaction is created if necessary"""
   866         with self._lock: # no transaction exist with the same id
   866         with self._lock: # no transaction exist with the same id
   867             try:
   867             try:
       
   868                 if self.closed:
       
   869                     raise SessionClosedError('try to access connections set on a closed session %s' % self.id)
   868                 tx = self._txs[txid]
   870                 tx = self._txs[txid]
   869             except KeyError:
   871             except KeyError:
   870                 rewriter = RQLRewriter(self)
   872                 rewriter = RQLRewriter(self)
   871                 tx = Transaction(txid, self, rewriter)
   873                 tx = Transaction(txid, self, rewriter)
   872                 self._txs[txid] = tx
   874                 self._txs[txid] = tx