1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-16 04:29:08 +00:00
trezor-firmware/trezorlib/transport_fake.py

25 lines
620 B
Python
Raw Normal View History

'''FakeTransport implements dummy interface for Transport.'''
# Local serial port loopback: socat PTY,link=COM8 PTY,link=COM9
2013-01-05 14:42:09 +00:00
from transport import Transport, NotImplementedException
class FakeTransport(Transport):
def __init__(self, device, *args, **kwargs):
super(FakeTransport, self).__init__(device, *args, **kwargs)
def _open(self):
pass
def _close(self):
pass
def ready_to_read(self):
return False
2014-07-26 14:27:28 +00:00
def _write(self, msg, protobuf_msg):
pass
def _read(self):
2014-07-26 14:27:28 +00:00
raise NotImplementedException("Not implemented")