klippy: Log shutdown state in invoke_shutdown()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-03-24 08:37:36 -04:00
parent 849cc075dc
commit 48237435b2
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ class Printer:
def invoke_shutdown(self, msg): def invoke_shutdown(self, msg):
if self.is_shutdown: if self.is_shutdown:
return return
logging.error("Transition to shutdown state: %s", msg)
self.is_shutdown = True self.is_shutdown = True
self._set_state("%s%s" % (msg, message_shutdown)) self._set_state("%s%s" % (msg, message_shutdown))
for cb in self.event_handlers.get("klippy:shutdown", []): for cb in self.event_handlers.get("klippy:shutdown", []):