From 5f8a668f4a284646076c4ae6801ded702d5dabf2 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Wed, 23 Oct 2024 09:26:27 +0200 Subject: [PATCH 1/2] Fix handing of "Wrong PIN" --- helper/helper/device.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/helper/helper/device.py b/helper/helper/device.py index 846fbc07..1417dd86 100644 --- a/helper/helper/device.py +++ b/helper/helper/device.py @@ -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 From 7518027c56985caf5d6a4f9fb3556cef3e8b992a Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Wed, 23 Oct 2024 10:02:45 +0200 Subject: [PATCH 2/2] Bump Python version --- .github/workflows/env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/env b/.github/workflows/env index 65d425ce..45bbcddd 100644 --- a/.github/workflows/env +++ b/.github/workflows/env @@ -1,2 +1,2 @@ FLUTTER=3.24.2 -PYVER=3.12.6 +PYVER=3.12.7