diff --git a/moonraker/components/data_store.py b/moonraker/components/data_store.py index 739cf38a..3153a3ca 100644 --- a/moonraker/components/data_store.py +++ b/moonraker/components/data_store.py @@ -155,12 +155,10 @@ def _update_gcode_store(self, response: str) -> None: def _store_gcode_command(self, script: str) -> None: curtime = time.time() - for cmd in script.split('\n'): - cmd = cmd.strip() - if not cmd: - continue + if script.strip(): self.gcode_queue.append( - {'message': script, 'time': curtime, 'type': "command"}) + {'message': script, 'time': curtime, 'type': "command"} + ) async def _handle_gcode_store_request(self, web_request: WebRequest