equal
deleted
inserted
replaced
140 |
140 |
141 def __exit__(self, exctype, exc, traceback): |
141 def __exit__(self, exctype, exc, traceback): |
142 self.session.reset_security(self.oldread, self.oldwrite) |
142 self.session.reset_security(self.oldread, self.oldwrite) |
143 |
143 |
144 |
144 |
145 class TransactionData(object): |
145 class Transaction(object): |
146 """Small object hold core Transaction data""" |
146 """Small object hold core Transaction data""" |
147 def __init__(self, txid): |
147 def __init__(self, txid): |
148 #: transaction unique id |
148 #: transaction unique id |
149 self.transactionid = txid |
149 self.transactionid = txid |
150 #: reentrance handling |
150 #: reentrance handling |
319 if txid is None: |
319 if txid is None: |
320 txid = threading.currentThread().getName() |
320 txid = threading.currentThread().getName() |
321 try: |
321 try: |
322 self.__threaddata.txdata = self._tx_data[txid] |
322 self.__threaddata.txdata = self._tx_data[txid] |
323 except KeyError: |
323 except KeyError: |
324 self.__threaddata.txdata = self._tx_data[txid] = TransactionData(txid) |
324 self.__threaddata.txdata = self._tx_data[txid] = Transaction(txid) |
325 |
325 |
326 @property |
326 @property |
327 def _threaddata(self): |
327 def _threaddata(self): |
328 try: |
328 try: |
329 return self.__threaddata.txdata |
329 return self.__threaddata.txdata |