mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-22 17:51:29 +03:00
Fix handing of "Wrong PIN"
This commit is contained in:
parent
353766bc01
commit
5f8a668f4a
@ -505,8 +505,13 @@ class ConnectionNode(RpcNode):
|
||||
raise ChildResetException(str(e))
|
||||
raise
|
||||
except Exception as e: # TODO: Replace with ConnectionError once added
|
||||
if "Wrong" in str(e):
|
||||
raise ChildResetException(str(e))
|
||||
words = str(e).split()
|
||||
try:
|
||||
word = words[words.index("Wrong") + 1]
|
||||
if word in ("nonce", "channel", "sequence"):
|
||||
raise ChildResetException(str(e))
|
||||
except ValueError:
|
||||
pass
|
||||
raise
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user