Commit bd199150 authored by Jim Fulton's avatar Jim Fulton

Fixed bug that could cause infinate loop when odd objects

got registered.
parent 47dc7992
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Transaction management """Transaction management
$Id: Transaction.py,v 1.15 1999/08/11 17:44:28 jim Exp $""" $Id: Transaction.py,v 1.16 1999/10/18 17:14:31 jim Exp $"""
__version__='$Revision: 1.15 $'[11:-2] __version__='$Revision: 1.16 $'[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