print_stats: Fix exception when canceling in/as first G-code

Signed-off-by: Dennis Marttinen <twelho@welho.tech>
This commit is contained in:
Dennis Marttinen authored and KevinOConnor committed 2021-11-21 08:01:43 -05:00
1 parent 8b401382f6
commit 83889ac435
1 file changed
+2
+2
View File
@@ -48,6 +48,8 @@ class PrintStats:
def note_cancel(self):
self._note_finish("cancelled")
def _note_finish(self, state, error_message = ""):
if self.print_start_time is None:
return
self.state = state
self.error_message = error_message
eventtime = self.reactor.monotonic()