From 063ad6cb3bf4ca8bd2053c7b5d05bc6df00fef2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 22 Jun 2020 10:10:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Minor=20code=20style=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/plugins/action_command_prompt/__init__.py | 2 +- src/octoprint/util/comm.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/octoprint/plugins/action_command_prompt/__init__.py b/src/octoprint/plugins/action_command_prompt/__init__.py index 6c074dc6f..680ea9dd1 100644 --- a/src/octoprint/plugins/action_command_prompt/__init__.py +++ b/src/octoprint/plugins/action_command_prompt/__init__.py @@ -223,7 +223,7 @@ class ActionCommandPromptPlugin(octoprint.plugin.AssetPlugin, if "{choice}" in self._command: self._printer.commands([self._command.format(choice=choice)]) else: - self._printer.commands(["{command} S{choice}".format(command=self._command, + self._printer.commands(["{command} S{choice}".format(command=self._command, choice=choice)]) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index b6b0db202..03eacc16c 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -3927,9 +3927,10 @@ class MachineCom(object): tags = set() if gcode in self._emergency_commands and gcode != "M112": - msg = "Force-sending {} to the printer".format(gcode) - self._logger.info(msg) - return self._emergency_force_send(cmd, msg, gcode=gcode, *args, **kwargs) + return self._emergency_force_send(cmd, + "Force-sending {} to the printer".format(gcode), + gcode=gcode, + *args, **kwargs) if self.isPrinting() and gcode in self._pausing_commands and not "trigger:cancel" in tags and not "trigger:pause" in tags: self._logger.info("Pausing print job due to command {}".format(gcode))