divide-by-zero fix

This commit is contained in:
jrwhite 2018-03-11 14:35:38 -05:00
parent a9219c3616
commit 0ddd8b55d7
1 changed files with 1 additions and 1 deletions

View File

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