klippy: Verify nothing attempts to pause in the klippy:ready event

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-10-06 21:37:31 -04:00
parent e549cc4143
commit 302df255db

View File

@@ -158,10 +158,11 @@ class Printer:
return
try:
self._set_state(message_ready)
for cb in self.event_handlers.get("klippy:ready", []):
if self.state_message is not message_ready:
return
cb()
with self.reactor.assert_no_pause():
for cb in self.event_handlers.get("klippy:ready", []):
if self.state_message is not message_ready:
return
cb()
except Exception as e:
logging.exception("Unhandled exception during ready callback")
self.invoke_shutdown("Internal error during ready callback: %s"