gcode_shell_command: Fix issue with partial lines being repeated (#118)

Without clearing the partial line on a full line being sent the self.partial_output was repeated for every subsequent line.
This commit is contained in:
Richard Mitchell
2021-09-27 16:44:11 +01:00
committed by GitHub
parent 1e8c379623
commit 6d87716b1d

View File

@@ -40,6 +40,8 @@ class ShellCommand:
split = data.rfind('\n') + 1
self.partial_output = data[split:]
data = data[:split]
else:
self.partial_output = ""
self.gcode.respond_info(data)
cmd_RUN_SHELL_COMMAND_help = "Run a linux shell command"