[Zodb-checkins] CVS: Zope/lib/python/ZODB - Transaction.py:1.49.4.3
michael dunstan
michael at elyt.com
Sat May 22 18:39:12 EDT 2004
Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv15301/lib/python/ZODB
Modified Files:
Tag: Zope-2_7-branch
Transaction.py
Log Message:
- Collector #852: Bug in the error reporting of some failure
cases in transactions meant that the cause of the failure was
not logged.
=== Zope/lib/python/ZODB/Transaction.py 1.49.4.2 => 1.49.4.3 ===
--- Zope/lib/python/ZODB/Transaction.py:1.49.4.2 Thu Jan 22 23:51:13 2004
+++ Zope/lib/python/ZODB/Transaction.py Sat May 22 18:38:28 2004
@@ -137,8 +137,11 @@
if t is None:
t, v, tb = sys.exc_info()
else:
- self.log("Failed to abort object %s" %
- oid_repr(o._p_oid), error=sys.exc_info())
+ if getattr(o,'_p_oid',None):
+ msg = "Failed to abort object %s" % repr(o._p_oid)
+ else:
+ msg = "Failed to abort object"
+ self.log(msg, error=sys.exc_info())
# tpc_begin() was never called, so tpc_abort() should not be
# called.
@@ -390,8 +393,11 @@
j.abort(o, self)
except:
# nothing to do but log the error
- self.log("Failed to abort object %s" % oid_repr(o._p_oid),
- error=sys.exc_info())
+ if getattr(o,'_p_oid',None):
+ msg = "Failed to abort object %s" % repr(o._p_oid)
+ else:
+ msg = "Failed to abort object"
+ self.log(msg, error=sys.exc_info())
# Abort the two-phase commit. It's only necessary to abort the
# commit for jars that began it, but it is harmless to abort it
More information about the Zodb-checkins
mailing list