diff options
-rwxr-xr-x | barcode_transmit_daemon.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |