divide-by-zero fix
This commit is contained in:
parent
a9219c3616
commit
0ddd8b55d7
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user