aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/print_stats.py
diff options
context:
space:
mode:
authorDennis Marttinen <twelho@welho.tech>2021-11-20 22:25:49 +0200
committerKevinOConnor <kevin@koconnor.net>2021-11-21 08:01:43 -0500
commit83889ac435ee61478460adfec875fa80eb861f6d (patch)
treefc4992df643c4d37d9428c55282c271f85689450 /klippy/extras/print_stats.py
parent8b401382f6be586985f488ee264ccd89fd332047 (diff)
downloadkutter-83889ac435ee61478460adfec875fa80eb861f6d.tar.gz
kutter-83889ac435ee61478460adfec875fa80eb861f6d.tar.xz
kutter-83889ac435ee61478460adfec875fa80eb861f6d.zip
print_stats: Fix exception when canceling in/as first G-code
Signed-off-by: Dennis Marttinen <twelho@welho.tech>
Diffstat (limited to 'klippy/extras/print_stats.py')
-rw-r--r--klippy/extras/print_stats.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/print_stats.py b/klippy/extras/print_stats.py
index ab300f27..9589aede 100644
--- a/klippy/extras/print_stats.py
+++ b/klippy/extras/print_stats.py
@@ -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()