Merge pull request #3287 from FHeilmann/patch-2

ActionPrompts: More flexibility for selection_command
This commit is contained in:
Gina Häußge authored and GitHub committed 2019-10-08 11:20:54 +02:00
commit e20a9925dd
2 files changed
+6 -2

No files matched your search

+1
View File
@@ -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
@@ -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"