Merge pull request #6 from ExtReMLapin/patch-1

Fixed sum crash when file size is a mult of 16384
This commit is contained in:
Markus Birth 2020-05-11 01:21:00 +02:00 committed by GitHub
commit 8a43b526de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,8 @@ class ChkSum:
with open(filename, "rb") as f:
while True:
block = f.read(blocksize)
self.add(block)
if len(block) != 0:
self.add(block)
if print_progress:
print(".", end="", flush=True)
if len(block) < blocksize: