divide-by-zero fix

This commit is contained in:
jrwhite 2018-03-11 14:35:38 -05:00
parent a9219c3616
commit 0ddd8b55d7

View File

@ -241,7 +241,7 @@ class Target:
block = 0 block = 0
for i in range(len(self.blocks)): for i in range(len(self.blocks)):
block += 1 block += 1
if callable(progress_cb): if callable(progress_cb) and totalblocks > 0:
progress_cb(block*100/totalblocks) progress_cb(block*100/totalblocks)
# Erase the block # Erase the block