Revision 331aa0ec image_creator/util.py
b/image_creator/util.py | ||
---|---|---|
113 | 113 |
BLOCKSIZE = 2 ** 22 # 4MB |
114 | 114 |
|
115 | 115 |
progressbar = progress("Calculating md5sum:", 'mb') |
116 |
progressbar.max = (size // (2 ** 20))
|
|
116 |
progressbar.max = ((size + 2 ** 20 - 1) // (2 ** 20))
|
|
117 | 117 |
md5 = hashlib.md5() |
118 | 118 |
with open(filename, "r") as src: |
119 | 119 |
left = size |
Also available in: Unified diff