[Zope-Checkins] SVN: Zope/branches/jim-fix-zclasses/lib/python/transaction/_manager.py Added commit and abort methods to transaction managers.

Jim Fulton jim at zope.com
Fri Apr 1 06:24:25 EST 2005


Log message for revision 29773:
  Added commit and abort methods to transaction managers.
  This makes direcr use of managers simpler.
  

Changed:
  U   Zope/branches/jim-fix-zclasses/lib/python/transaction/_manager.py

-=-
Modified: Zope/branches/jim-fix-zclasses/lib/python/transaction/_manager.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/transaction/_manager.py	2005-04-01 11:24:22 UTC (rev 29772)
+++ Zope/branches/jim-fix-zclasses/lib/python/transaction/_manager.py	2005-04-01 11:24:25 UTC (rev 29773)
@@ -94,7 +94,13 @@
     def unregisterSynch(self, synch):
         self._synchs.remove(synch)
 
-class ThreadTransactionManager(object):
+    def commit(self):
+        self.get().commit()
+
+    def abort(self):
+        self.get().abort()
+
+class ThreadTransactionManager(TransactionManager):
     """Thread-aware transaction manager.
 
     Each thread is associated with a unique transaction.



More information about the Zope-Checkins mailing list