reworking block skipper

This commit is contained in:
Edwin Eefting
2022-03-07 21:08:56 +01:00
parent b68ca19e5f
commit 233745c345
4 changed files with 54 additions and 7 deletions

View File

@ -61,14 +61,9 @@ class BlockHasher():
yields nothing for empty files.
"""
with os.open(fname, os.O_RDONLY) as fh:
print (os.lseek(fh, 0, os.SEEK_END))
with os.openopen(fname, "rb") as fh:
# print(os.path.getsize(fname))
print(os.lseek(fh, 0, os.SEEK_END))
with open(fname, "rb") as fh:
fsize = fh.seek(0, os.SEEK_END)
fh.seek(0)