Skip to content

Commit 119b92f

Browse files
Fix PCSC reader detection
1 parent bb83a0e commit 119b92f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ledgerblue/comm.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,13 @@ def getDongle(debug=False):
300300
return DongleBLE(debug)
301301
elif PCSC is not None:
302302
# Use the first pcsc reader with a card inserted
303-
connection = None
304303
for reader in readers():
305304
try:
306305
connection = reader.createConnection()
307306
connection.connect()
307+
return DongleSmartcard(connection, debug)
308308
except Exception:
309-
connection = None
310309
pass
311-
if connection is not None:
312-
return DongleSmartcard(connection, debug)
313310
else:
314311
# USB HID by default
315312
dev = None

0 commit comments

Comments
 (0)