Commit fbe71932 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 24da20c9
...@@ -867,10 +867,10 @@ class FileCache(object): ...@@ -867,10 +867,10 @@ class FileCache(object):
obj.serialize_header(self.f) obj.serialize_header(self.f)
def settid(self, tid): def settid(self, tid):
if self.tid is not None: if self.tid is not None and tid <= self.tid:
if tid < self.tid: raise ValueError("new last tid (%s) must be greater than "
raise ValueError( "previous one (%s)" % (u64(tid),
"new last tid must be greater that previous one") u64(self.tid)))
self.tid = tid self.tid = tid
self.f.seek(4) self.f.seek(4)
self.f.write(tid) 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