equal
deleted
inserted
replaced
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 |