Allow looking TREZOR by path prefix

This commit is contained in:
Roman Zeyde
2021-06-21 21:28:34 +03:00
parent bcea720e95
commit 338a075ed5

View File

@@ -25,7 +25,7 @@ def find_device():
If unset, picks first connected device.
"""
try:
return get_transport(os.environ.get("TREZOR_PATH"))
return get_transport(os.environ.get("TREZOR_PATH"), prefix_search=True)
except Exception as e: # pylint: disable=broad-except
log.debug("Failed to find a Trezor device: %s", e)
return None