[Zodb-checkins] CVS: ZODB3/ZEO - cache.py:1.5

Tim Peters tim.one at comcast.net
Fri Jan 2 10:14:59 EST 2004


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv18436/ZEO

Modified Files:
	cache.py 
Log Message:
settid():  Display the tid values when the "new tid must be greater than
previous one" check fails.  Surprise!  The test was using tid < self.tid,
not <=, so it can't be the case that the test was failing because the new
tid was equal to the last one.  Changed the test to use <=.  Maybe that's
not a good change, but, if not, then the error message is wrong <wink>.


=== ZODB3/ZEO/cache.py 1.4 => 1.5 ===
--- ZODB3/ZEO/cache.py:1.4	Tue Dec 30 17:18:35 2003
+++ ZODB3/ZEO/cache.py	Fri Jan  2 10:14:58 2004
@@ -867,10 +867,10 @@
         obj.serialize_header(self.f)
 
     def settid(self, tid):
-        if self.tid is not None:
-            if tid < self.tid:
-                raise ValueError(
-                    "new last tid must be greater that previous one")
+        if self.tid is not None and tid <= self.tid:
+            raise ValueError("new last tid (%s) must be greater than "
+                             "previous one (%s)" % (u64(tid),
+                                                    u64(self.tid)))
         self.tid = tid
         self.f.seek(4)
         self.f.write(tid)




More information about the Zodb-checkins mailing list