From 1d3fa77ab6418abbdfa2caa479265f4c73adad80 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 3 Oct 2018 14:00:24 +0200 Subject: [PATCH] debuglink: allow with-block without expected_responses --- trezorlib/debuglink.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trezorlib/debuglink.py b/trezorlib/debuglink.py index 35756b30c0..0b32625841 100644 --- a/trezorlib/debuglink.py +++ b/trezorlib/debuglink.py @@ -214,6 +214,10 @@ class TrezorClientDebugLink(TrezorClient): # Another exception raised return False + if self.expected_responses is None: + # no need to check anything else + return False + # return isinstance(value, TypeError) # Evaluate missed responses in 'with' statement if self.current_response < len(self.expected_responses):