Annotation of ExtFile/transaction_.py, revision 1.1
1.1 ! dwinter 1: #
! 2: # Zope 2.8-style transactions for Zope <= 2.7.
! 3: #
! 4:
! 5: # $Id: transaction_.py 15452 2005-12-30 21:29:18Z shh42 $
! 6:
! 7: def get():
! 8: return get_transaction()
! 9:
! 10: def begin():
! 11: get_transaction().begin()
! 12:
! 13: def commit(sub=0):
! 14: get_transaction().commit(sub)
! 15:
! 16: def abort(sub=0):
! 17: get_transaction().abort(sub)
! 18:
! 19: def savepoint(optimistic=0):
! 20: get_transaction().commit(1)
! 21: return DummySavePoint()
! 22:
! 23: class DummySavePoint:
! 24: valid = 0
! 25: def rollback(self):
! 26: raise RuntimeError, 'Rollback of dummy savepoint'
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>