mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 19:38:09 +00:00
Fix error when using trezorctl to connect to the trezor-core emulator. (#152)
* Fix error when using trezorctl to connect to the trezor-core emulator. * Restore the ability to specify the host without the port
This commit is contained in:
parent
0d9ee4376d
commit
5d2d621055
@ -36,9 +36,9 @@ class UdpTransport(Transport):
|
||||
host = UdpTransport.DEFAULT_HOST
|
||||
port = UdpTransport.DEFAULT_PORT
|
||||
else:
|
||||
host = device.split(':').get(0)
|
||||
port = device.split(':').get(1, UdpTransport.DEFAULT_PORT)
|
||||
port = int(port)
|
||||
devparts = device.split(':')
|
||||
host = devparts[0]
|
||||
port = int(devparts[1]) if len(devparts) > 1 else UdpTransport.DEFAULT_PORT
|
||||
if not protocol:
|
||||
protocol = ProtocolV2()
|
||||
self.device = (host, port)
|
||||
|
Loading…
Reference in New Issue
Block a user