summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2016-07-15 18:45:33 +1200
committerFlorian Baumann <derflob@derflob.de>2016-07-15 18:45:33 +1200
commitb2d49c9a6b0d6132b3bc4308cca10aa3423ffe50 (patch)
treeab30a0ee878d9390e5386e2f7c2b0df9aa7af3d8
parent33cf4160a3513dadd786ee4d89f5b4b6d1cfa25e (diff)
downloadxmpp-cmd_status_job.tar.gz
xmpp-cmd_status_job.tar.bz2
cmd: status state for debug purposescmd_status_job
-rw-r--r--__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/__init__.py b/__init__.py
index 8268104..e7d4396 100644
--- a/__init__.py
+++ b/__init__.py
@@ -142,7 +142,7 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
if (subsystem == 'all'):
reply = '\n\n'.join([getattr(self, "_status_{}".format(s))() for s in subsystems])
- elif (subsystem in subsystems):
+ elif (subsystem in subsystems + ['state']):
reply = getattr(self, "_status_{}".format(subsystem))()
else:
reply = "Unknown subsystem ({}).\nAvailable: {}".format(subsystem, ", ".join(['all'] + subsystems))
@@ -169,6 +169,9 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
else:
return "Machine state:\n{}".format(self._printer.get_state_string())
+ def _status_state(self):
+ return "{}".format(self._printer.get_current_data())
+
def _cmd_snapshot(self, msg):
(snapshot, content_type) = self._take_snapshot()
if (snapshot):