Skip to content

Commit 90ee720

Browse files
committed
Partially fix Windows NFC issue
1 parent 75ea401 commit 90ee720

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

helper/helper/device.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def __init__(self):
140140
self._state = set()
141141
self._readers = {}
142142
self._reader_mapping = {}
143+
self.scan()
143144

144145
@action(closes_child=False)
145146
def scan(self):
@@ -468,6 +469,8 @@ def get(self):
468469
def ccid(self):
469470
try:
470471
connection = self._device.open_connection(SmartCardConnection)
472+
if not self._info:
473+
self._read_data(connection)
471474
return ScpConnectionNode(self._device, connection, self._info)
472475
except (ValueError, SmartcardException, EstablishContextException) as e:
473476
logger.warning("Error opening connection", exc_info=True)
@@ -476,6 +479,9 @@ def ccid(self):
476479
@child
477480
def fido(self):
478481
try:
482+
if not self._info:
483+
with self._device.open_connection(SmartCardConnection) as connection:
484+
self._read_data(connection)
479485
connection = self._device.open_connection(FidoConnection)
480486
return ConnectionNode(
481487
self._device, connection, self._info, self._device.reader.name

helper/poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)