Progress might be 0, don't divide by it then

This commit is contained in:
Gina Häußge 2017-07-13 15:48:22 +02:00
parent a33f44ea25
commit 142a1b0dcb

View file

@ -763,7 +763,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
(2-tuple) estimated print time left or None if not proper estimate could be made at all, origin of estimation
"""
if progress is None or printTime is None or cleanedPrintTime is None:
if progress is None or progress == 0 or printTime is None or cleanedPrintTime is None:
return None, None
dumbTotalPrintTime = printTime / progress