projects
/
snf-image-creator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add support for GUID Partition Tables
[snf-image-creator]
/
image_creator
/
util.py
diff --git
a/image_creator/util.py
b/image_creator/util.py
index
efccabb
..
d3d4cc0
100644
(file)
--- a/
image_creator/util.py
+++ b/
image_creator/util.py
@@
-113,7
+113,7
@@
def md5(filename, size):
BLOCKSIZE = 2 ** 22 # 4MB
progressbar = progress("Calculating md5sum:", 'mb')
- progressbar.max = (size // (2 ** 20))
+ progressbar.max = ((size + 2 ** 20 - 1) // (2 ** 20))
md5 = hashlib.md5()
with open(filename, "r") as src:
left = size