diff --git a/AUTHORS.md b/AUTHORS.md index 38730e8d6..7c5951d33 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -108,6 +108,7 @@ date of first contribution): * [Piotr Usewicz](https://github.com/pusewicz) * [Aliaksei Pilko](https://github.com/aliaksei135) * [Ben Yarmis](https://github.com/byarmis) + * [Florian Heilmann](https://github.com/FHeilmann) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/plugins/action_command_prompt/__init__.py b/src/octoprint/plugins/action_command_prompt/__init__.py index dc5f796e8..ca45ab689 100644 --- a/src/octoprint/plugins/action_command_prompt/__init__.py +++ b/src/octoprint/plugins/action_command_prompt/__init__.py @@ -207,8 +207,11 @@ class ActionCommandPromptPlugin(octoprint.plugin.AssetPlugin, return self._close_prompt() - self._printer.commands(["{command} S{choice}".format(command=self._command, - choice=choice)]) + if "{choice}" in self._command: + self._printer.commands([self._command.format(choice=choice)]) + else: + self._printer.commands(["{command} S{choice}".format(command=self._command, + choice=choice)]) __plugin_name__ = "Action Command Prompt Support"