From b333e1577c372060ec0829dfa9ec1b49e6ba771e Mon Sep 17 00:00:00 2001 From: Andreas Mieke Date: Wed, 17 Apr 2024 22:23:16 -0400 Subject: [PATCH] fix(test): Fix test server to actually save the code --- inventree_phomemo/server.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/inventree_phomemo/server.py b/inventree_phomemo/server.py index 01dcdbf..1f51e09 100644 --- a/inventree_phomemo/server.py +++ b/inventree_phomemo/server.py @@ -11,13 +11,12 @@ s.listen(1) while True: conn, addr = s.accept() print(addr) + printer = open('test.png', 'wb') while True: - data = conn.recv(9100) + data = conn.recv(91000) print('data received') print('Sending to printer...') - - printer=open('test.png','wb') printer.write(data) - printer.close() if not data: - break \ No newline at end of file + break + printer.close() \ No newline at end of file