Commit c2690479 authored by Jim Fulton's avatar Jim Fulton

Added destructor to free objects if a transaction is lost without an abort.

parent 2f9e78bd
......@@ -84,8 +84,8 @@
##############################################################################
"""Transaction management
$Id: Transaction.py,v 1.11 1999/07/07 19:57:03 jim Exp $"""
__version__='$Revision: 1.11 $'[11:-2]
$Id: Transaction.py,v 1.12 1999/07/22 15:03:09 jim Exp $"""
__version__='$Revision: 1.12 $'[11:-2]
import time, sys, struct
from struct import pack
......@@ -124,6 +124,9 @@ class Transaction:
def __str__(self): return "%.3f\t%s" % (self._id, self.user)
def __del__(self):
if self._objects: self.abort(freeme=0)
def abort(self, subtransaction=0, freeme=1):
'''Abort the transaction.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment