error handling for untimley removal of key
This commit is contained in:
4
main.py
4
main.py
@@ -72,6 +72,7 @@ while True:
|
||||
# GPIO.output(14, GPIO.LOW)
|
||||
print("Waiting for device...")
|
||||
while True:
|
||||
try:
|
||||
# GPIO.output(14, GPIO.LOW)
|
||||
dev = next(CtapHidDevice.list_devices(), None)
|
||||
|
||||
@@ -84,7 +85,8 @@ while True:
|
||||
break
|
||||
|
||||
time.sleep(0.1)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# Handle user interaction
|
||||
|
||||
try:
|
||||
|
Reference in New Issue
Block a user