[ZODB-Dev] Connection.commit ReadConflictError
Christian Reis
kiko at async.com.br
Sun May 18 15:07:18 EDT 2003
Would appreciate comments! <wink>
This small patch makes printing the exception correct. Before:
>>> c2.getTransaction().commit()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.1/site-packages/ZODB/Transaction.py",
line 233, in commit
ncommitted += self._commit_objects(objects)
File "/usr/local/lib/python2.1/site-packages/ZODB/Transaction.py",
line 348, in _commit_objects
jar.commit(o, self)
File "/usr/local/lib/python2.1/site-packages/ZODB/Connection.py", line
335, in commit
raise ReadConflictError(oid)
ZODB.POSException.ReadConflictError: Ñ
After:
>>> c2.getTransaction().commit()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.1/site-packages/ZODB/Transaction.py",
line 233, in commit
ncommitted += self._commit_objects(objects)
File "/usr/local/lib/python2.1/site-packages/ZODB/Transaction.py",
line 348, in _commit_objects
jar.commit(o, self)
File "/usr/local/lib/python2.1/site-packages/ZODB/Connection.py", line
338, in commit
raise ReadConflictError(object=object)
ZODB.POSException.ReadConflictError: database read conflict error (oid
00000000000007d1, class IndexedCatalog.BTrees.OOBTree.OOBTree)
Index: Connection.py
===================================================================
RCS file: /cvs-repository/ZODB3/ZODB/Connection.py,v
retrieving revision 1.91
diff -u -r1.91 Connection.py
--- Connection.py 23 Apr 2003 20:36:02 -0000 1.91
+++ Connection.py 18 May 2003 16:48:26 -0000
@@ -316,7 +332,7 @@
oid = object._p_oid
if self._conflicts.has_key(oid):
- raise ReadConflictError(oid)
+ raise ReadConflictError(object=object)
invalid = self._invalid
if oid is None or object._p_jar is not self:
Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
More information about the ZODB-Dev
mailing list