diff --git a/trezorlib/transport_bridge.py b/trezorlib/transport_bridge.py index 64276d0..e9f6005 100644 --- a/trezorlib/transport_bridge.py +++ b/trezorlib/transport_bridge.py @@ -52,6 +52,9 @@ class BridgeTransport(Transport): self.response = None def __str__(self): + return self.get_path() + + def get_path(self): return '%s:%s' % (self.PATH_PREFIX, self.device['path']) @staticmethod diff --git a/trezorlib/transport_hid.py b/trezorlib/transport_hid.py index 9184757..6b23991 100644 --- a/trezorlib/transport_hid.py +++ b/trezorlib/transport_hid.py @@ -79,6 +79,9 @@ class HidTransport(Transport): self.hid_version = None def __str__(self): + return self.get_path() + + def get_path(self): return "%s:%s" % (self.PATH_PREFIX, self.device['path'].decode()) @staticmethod diff --git a/trezorlib/transport_udp.py b/trezorlib/transport_udp.py index 30aa041..dc6be3d 100644 --- a/trezorlib/transport_udp.py +++ b/trezorlib/transport_udp.py @@ -56,6 +56,9 @@ class UdpTransport(Transport): self.socket = None def __str__(self): + return self.get_path() + + def get_path(self): return "%s:%s:%s" % ((self.PATH_PREFIX,) + self.device) @staticmethod diff --git a/trezorlib/transport_webusb.py b/trezorlib/transport_webusb.py index c78ef94..7b77239 100644 --- a/trezorlib/transport_webusb.py +++ b/trezorlib/transport_webusb.py @@ -88,6 +88,9 @@ class WebUsbTransport(Transport): self.debug = debug def __str__(self): + return self.get_path() + + def get_path(self): return "%s:%s" % (self.PATH_PREFIX, dev_to_str(self.device)) @classmethod