summaryrefslogtreecommitdiff
path: root/iot_barcode_device_handler
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2020-10-30 11:23:09 +0100
committerxengineering <mail2xengineering@protonmail.com>2020-10-30 11:23:09 +0100
commitcc2479fe1f83623f0a4a9c928b0c05ae102f5e16 (patch)
tree960bdf554e6f883847bc15930e5724f0524aaf45 /iot_barcode_device_handler
parentbef7293b8e6a8337026d695d3467cc667390019b (diff)
downloadiot-barcode-scanner-cc2479fe1f83623f0a4a9c928b0c05ae102f5e16.tar
iot-barcode-scanner-cc2479fe1f83623f0a4a9c928b0c05ae102f5e16.tar.zst
iot-barcode-scanner-cc2479fe1f83623f0a4a9c928b0c05ae102f5e16.zip
Hardening against unrecognized and multiple Keycodes at onceHEADmain
Diffstat (limited to 'iot_barcode_device_handler')
-rwxr-xr-xiot_barcode_device_handler1
1 files changed, 1 insertions, 0 deletions
diff --git a/iot_barcode_device_handler b/iot_barcode_device_handler
index 5c05aab..ef40d3e 100755
--- a/iot_barcode_device_handler
+++ b/iot_barcode_device_handler
@@ -30,6 +30,7 @@ def main():
if eventdata.keystate:
with open(fifo_path, "w") as fifo:
fifo.write(eventdata.keycode)
+ fifo.write("\n")
fifo.flush()
except KeyboardInterrupt: