From 85bf0f03a570a7041a479363ff6a4865f0582893 Mon Sep 17 00:00:00 2001 From: Chao ZHOU Date: Fri, 4 Feb 2022 15:45:33 +0800 Subject: [PATCH] Update __init__.py fixed bug: Not response when a M118 command with comment --- octoprint_actioncommands/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/octoprint_actioncommands/__init__.py b/octoprint_actioncommands/__init__.py index a47283e..badcb37 100644 --- a/octoprint_actioncommands/__init__.py +++ b/octoprint_actioncommands/__init__.py @@ -88,6 +88,9 @@ def hook_actioncommands(self, comm, line, command, *args, **kwargs): return else: + if ";" in command: + command = command.split(';')[0] + command = command.strip() try: this_command = self.command_definitions[command] self._logger.info("Command found for 'action:%s'" % (command))