Thanks to Jimmy Tang for his help testing these since I don't have python
2.4 easily available.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
PAGE_SIZE=4096
SHA_PER_PAGE=PAGE_SIZE/20.
+SEEK_END=2 # os.SEEK_END is not defined in python 2.4
optspec = """
bup midx [options...] <idxnames...>
fmap.flush()
fmap.close()
- f.seek(0, os.SEEK_END)
+ f.seek(0, SEEK_END)
f.write('\0'.join(allfilenames))
f.close()
os.rename(outfilename + '.tmp', outfilename)
return cls(name, f=f, readwrite=True, expected=expected)
def __len__(self):
- return self.entries
+ return int(self.entries)
class PackMidx: