diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index cd445049a6..4e4c5bf73d 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -521,6 +521,8 @@ class DebugLink: self, wait_type: DebugWaitType = DebugWaitType.CURRENT_LAYOUT ) -> messages.DebugLinkState: result = self._call(messages.DebugLinkGetState(wait_layout=wait_type)) + while not isinstance(result, (messages.Failure, messages.DebugLinkState)): + result = self._read() if isinstance(result, messages.Failure): raise TrezorFailure(result) return result