Commit e43629eef54f79a34c19ddf388bc135dce2db922
Commits[COMMIT BEGIN]commit e43629eef54f79a34c19ddf388bc135dce2db922 Author: 0x4248 <[email protected]> Date: Tue Feb 3 09:31:11 2026 +0000 escpos: fix command hang diff --git a/toolkits/ESCPOS/src/server.py b/toolkits/ESCPOS/src/server.py index 800665b..e464c5b 100644 --- a/toolkits/ESCPOS/src/server.py +++ b/toolkits/ESCPOS/src/server.py @@ -75,8 +75,15 @@ def print_escpos(print_id): cmdline = generate_escpos_cmdline(print_id) logging.debug(f"Executing command: {cmdline}") - process = Popen(shlex.split(cmdline), stdout=PIPE, stderr=PIPE) - stdout, stderr = process.communicate() + with open(job_file_path, "rb") as infile, open(PRINTER, "wb") as outfile: + process = Popen( + ["./build/escpos"], + stdin=infile, + stdout=outfile, + stderr=PIPE, + ) + _, stderr = process.communicate() + if process.returncode != 0: logging.error(f"Error printing job {print_id}: {stderr.decode('utf-8')}")[COMMIT END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.