Commit 583c488d authored by Andreas Jung's avatar Andreas Jung

Transaction objects with self.id==None could not print themselves (COllector #2275)

parent e670f33c
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Transaction management """Transaction management
$Id: Transaction.py,v 1.28 2001/03/29 17:43:19 jeremy Exp $""" $Id: Transaction.py,v 1.29 2001/06/04 12:28:46 andreas Exp $"""
__version__='$Revision: 1.28 $'[11:-2] __version__='$Revision: 1.29 $'[11:-2]
import time, sys, struct, POSException import time, sys, struct, POSException
from struct import pack from struct import pack
...@@ -132,7 +132,7 @@ class Transaction: ...@@ -132,7 +132,7 @@ class Transaction:
r._extension=self._extension r._extension=self._extension
return r return r
def __str__(self): return "%.3f\t%s" % (self._id, self.user) def __str__(self): return "%.3f\t%s" % (self._id or 0, self.user)
def __del__(self): def __del__(self):
if self._objects: self.abort(freeme=0) if self._objects: self.abort(freeme=0)
......
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