From bf5f3cbad41d9c6c038319bb0311cdef85f6cf8e Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 19 Oct 2020 17:58:51 +0200 Subject: Remove doubled Newline --- barcode_transmit_daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'barcode_transmit_daemon.py') diff --git a/barcode_transmit_daemon.py b/barcode_transmit_daemon.py index 624550e..a2d7eb6 100755 --- a/barcode_transmit_daemon.py +++ b/barcode_transmit_daemon.py @@ -27,7 +27,6 @@ def main(): with open(fifo_path, "r") as fifo: keycode = fifo.read() character = KEYMAP[keycode] - barcode += character if character is "\n": mqtt_service.client.publish( topic, @@ -36,6 +35,8 @@ def main(): retain=False ) barcode = "" + else: + barcode += character except KeyboardInterrupt: pass -- cgit v1.2.3-70-g09d2