Commit bdec0b67 authored by Chris McDonough's avatar Chris McDonough

Fixed "while objects" loop in commit to do the right thing with the object...

Fixed "while objects" loop in commit to do the right thing with the object list element (toss it) if it doesn't have a _p_jar.  Not doing this was causing an infinite loop.
parent 8af4dd3e
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Transaction management """Transaction management
$Id: Transaction.py,v 1.20 2000/05/12 23:57:31 jim Exp $""" $Id: Transaction.py,v 1.21 2000/05/28 02:22:53 chrism Exp $"""
__version__='$Revision: 1.20 $'[11:-2] __version__='$Revision: 1.21 $'[11:-2]
import time, sys, struct, POSException import time, sys, struct, POSException
from struct import pack from struct import pack
...@@ -223,7 +223,7 @@ class Transaction: ...@@ -223,7 +223,7 @@ class Transaction:
try: try:
try: try:
while objects: while objects:
o=objects[-1] o=objects.pop()
j=getattr(o, '_p_jar', o) j=getattr(o, '_p_jar', o)
if j is None: continue if j is None: continue
i=id(j) i=id(j)
...@@ -235,7 +235,6 @@ class Transaction: ...@@ -235,7 +235,6 @@ class Transaction:
else: else:
j.tpc_begin(self) j.tpc_begin(self)
j.commit(o,self) j.commit(o,self)
del objects[-1]
# Commit work done in subtransactions # Commit work done in subtransactions
while subjars: while subjars:
......
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