[Zodb-checkins] CVS: ZODB3/ZODB - Connection.py:1.98.4.5 POSException.py:1.20.4.2

Tim Peters cvs-admin at zope.org
Thu Oct 23 20:46:26 EDT 2003


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv4702/ZODB

Modified Files:
      Tag: Zope-2_7-branch
	Connection.py POSException.py 
Log Message:
Removed an unnecessary blank.

Also, inserted a secret private API for ignoring read conflicts.  Maybe
we'll admit to it someday, maybe not.


=== ZODB3/ZODB/Connection.py 1.98.4.4 => 1.98.4.5 ===
--- ZODB3/ZODB/Connection.py:1.98.4.4	Wed Oct  1 15:30:59 2003
+++ ZODB3/ZODB/Connection.py	Thu Oct 23 20:45:55 2003
@@ -626,6 +626,9 @@
             self.getTransaction().register(obj)
             raise ReadConflictError(object=obj)
 
+    def _ignore_conflict(self, oid):
+        del self._conflicts[oid]
+
     def oldstate(self, object, serial):
         oid=object._p_oid
         p = self._storage.loadSerial(oid, serial)
@@ -633,7 +636,7 @@
         unpickler=Unpickler(file)
         unpickler.persistent_load=self._persistent_load
         unpickler.load()
-        return  unpickler.load()
+        return unpickler.load()
 
     def setklassstate(self, object):
         try:


=== ZODB3/ZODB/POSException.py 1.20.4.1 => 1.20.4.2 ===
--- ZODB3/ZODB/POSException.py:1.20.4.1	Mon Sep 15 17:26:56 2003
+++ ZODB3/ZODB/POSException.py	Thu Oct 23 20:45:55 2003
@@ -112,11 +112,13 @@
     An attempt was made to read an object that has changed in another
     transaction (eg. another thread or process).
     """
-    def __init__(self, message=None, object=None, serials=None):
-        if message is None:
-            message = "database read conflict error"
-        ConflictError.__init__(self, message=message, object=object,
-                               serials=serials)
+    def __init__(self, object):
+        ConflictError.__init__(self, message="database read conflict error",
+                               object=object)
+        self.jar = object._p_jar
+
+    def ignore(self):
+        self.jar._ignore_conflict(self.oid)
 
 class BTreesConflictError(ConflictError):
     """A special subclass for BTrees conflict errors.




More information about the Zodb-checkins mailing list