Skip to content

Commit

Permalink
Fix typing warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Nov 19, 2024
1 parent badaee1 commit 3c0612a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fido2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,13 +787,14 @@ def _do_make():
user_verification = UserVerificationRequirement.REQUIRED
continue
# NFC may require reconnect
connect = getattr(dev, "connect", None)
if (
e.code == CtapError.ERR.PIN_AUTH_BLOCKED
and hasattr(dev, "connect")
and connect
and not reconnected
):
dev.close()
dev.connect()
connect()
reconnected = True # We only want to try this once
continue
raise
Expand Down Expand Up @@ -919,13 +920,14 @@ def _do_auth():
user_verification = UserVerificationRequirement.REQUIRED
continue
# NFC may require reconnect
connect = getattr(dev, "connect", None)
if (
e.code == CtapError.ERR.PIN_AUTH_BLOCKED
and hasattr(dev, "connect")
and connect
and not reconnected
):
dev.close()
dev.connect()
connect()
reconnected = True # We only want to try this once
continue
raise
Expand Down

0 comments on commit 3c0612a

Please sign in to comment.