Commit 42b59190 authored by Tim Peters's avatar Tim Peters

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>.
parent ba14ae3d
......@@ -867,10 +867,10 @@ class FileCache(object):
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)
......
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