summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2016-07-15 21:51:21 +1200
committerFlorian Baumann <derflob@derflob.de>2016-07-15 21:51:21 +1200
commite0428e2d84a94505d511f89f10f62f4b2d1f6ffc (patch)
treeb8ea2398f9e006616d24b8e511c53535582bc196
parent1fa7a81a1e50132b8bdfcc18a94fdd7f46afa1a2 (diff)
downloadxmpp-e0428e2d84a94505d511f89f10f62f4b2d1f6ffc.tar.gz
xmpp-e0428e2d84a94505d511f89f10f62f4b2d1f6ffc.tar.bz2
correct status job
-rw-r--r--__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/__init__.py b/__init__.py
index e519cf4..0e690f6 100644
--- a/__init__.py
+++ b/__init__.py
@@ -162,8 +162,8 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
def _status_job(self):
state = self._printer.get_current_data()
lines = ["Job state:\n"]
- if (state['file']['origin']):
- lines.append("File: {}".format(state['file']['name']))
+ if (state['job']['file']['origin']):
+ lines.append("File: {}".format(state['job']['file']['name']))
flags = state['state']['flags']
if (flags['paused']):
@@ -180,7 +180,7 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
lines.append("Printing for {printTime}.".format(
self.__format_duration(state['progress']['printTime'])))
- for (k, v) in state['filament'].items():
+ for (k, v) in state['job']['filament'].items():
if (v['length'] > 1000.0):
lines.append("Filament ({}): {:.1f}cm³/{:.2f}m".format(
v['volume'], v['length']/1000.0))