From 4f59e0fd4806e7f6226b4ed8fd9bd67589df0cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 4 Mar 2019 17:29:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20resumed=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/comm/protocol/reprap/__init__.py | 3 ++- src/octoprint/printer/standard.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/octoprint/comm/protocol/reprap/__init__.py b/src/octoprint/comm/protocol/reprap/__init__.py index 0a43acad3..c04969724 100644 --- a/src/octoprint/comm/protocol/reprap/__init__.py +++ b/src/octoprint/comm/protocol/reprap/__init__.py @@ -773,9 +773,10 @@ class ReprapGcodeProtocol(Protocol, ThreeDPrinterProtocolMixin, MotorControlProt if job != self._job: return + self.notify_listeners("on_protocol_job_resumed", self, job, *args, **kwargs) + def finalize(): self.state = ProtocolState.PROCESSING - self.notify_listeners("on_protocol_job_resumed", self, job, *args, **kwargs) self.send_commands(SendQueueMarker(finalize)) self._continue_sending() diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 4ec1f311e..31a7e49f4 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -1478,13 +1478,13 @@ class Printer(PrinterInterface, if self._job_event_handled(protocol, job, "resumed"): return - suppress_scripts = kwargs.get("suppress_scripts", False) + suppress_script = kwargs.get("suppress_script", False) payload = job.event_payload() if payload: payload["user"] = kwargs.get("user") - if not suppress_scripts: + if not suppress_script: self.script("beforePrintResumed", context=dict(event=payload), must_be_set=False)