Merge pull request #6 from ExtReMLapin/patch-1
Fixed sum crash when file size is a mult of 16384
This commit is contained in:
commit
8a43b526de
@ -15,7 +15,8 @@ class ChkSum:
|
|||||||
with open(filename, "rb") as f:
|
with open(filename, "rb") as f:
|
||||||
while True:
|
while True:
|
||||||
block = f.read(blocksize)
|
block = f.read(blocksize)
|
||||||
self.add(block)
|
if len(block) != 0:
|
||||||
|
self.add(block)
|
||||||
if print_progress:
|
if print_progress:
|
||||||
print(".", end="", flush=True)
|
print(".", end="", flush=True)
|
||||||
if len(block) < blocksize:
|
if len(block) < blocksize:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user