reworking block skipper
This commit is contained in:
@ -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)
|
||||
|
||||
@ -39,7 +39,7 @@ class ZfsCheck(CliBase):
|
||||
group.add_argument('--check', '-c', metavar="FILE", default=None, const=True, nargs='?',
|
||||
help="Read hashes from STDIN (or FILE) and compare them")
|
||||
|
||||
group.add_argument('--skip', '-s', metavar="NUMBER", default=0, type=float,
|
||||
group.add_argument('--skip', '-s', metavar="NUMBER", default=0, type=int,
|
||||
help="Skip this number of chunks after every hash. %(default)s")
|
||||
|
||||
return parser
|
||||
|
||||
Reference in New Issue
Block a user