From 25130b63e2a98f50f5cfc76b10f7a72a6de4c372 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Fri, 12 Jul 2019 09:19:30 +0200 Subject: [PATCH] Fix logic --- plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py | 3 ++- .../src/ClusterUM3PrinterOutputController.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py index dd69a7fe35..5344fe2021 100644 --- a/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py @@ -393,7 +393,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): # Set the remote print job state. def setJobState(self, print_job_uuid: str, state: str) -> None: # We rewrite 'resume' to 'print' here because we are using the old print job action endpoints. - data = "{\"action\": \"%s\"}" % "print" if state == "resume" else state + action = "print" if state == "resume" else state + data = "{\"action\": \"%s\"}" % action self.put("print_jobs/%s/action" % print_job_uuid, data, on_finished=None) def _printJobStateChanged(self) -> None: diff --git a/plugins/UM3NetworkPrinting/src/ClusterUM3PrinterOutputController.py b/plugins/UM3NetworkPrinting/src/ClusterUM3PrinterOutputController.py index 7273e01f0f..103be8b01e 100644 --- a/plugins/UM3NetworkPrinting/src/ClusterUM3PrinterOutputController.py +++ b/plugins/UM3NetworkPrinting/src/ClusterUM3PrinterOutputController.py @@ -16,5 +16,5 @@ class ClusterUM3PrinterOutputController(PrinterOutputController): self.can_control_manually = False self.can_send_raw_gcode = False - def setJobState(self, job: "PrintJobOutputModel", state: str): + def setJobState(self, job: "PrintJobOutputModel", state: str) -> None: self._output_device.setJobState(job.key, state)