1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00
trezor-firmware/trezorlib/transport_fake.py
2013-09-13 05:37:23 +02:00

24 lines
605 B
Python

'''FakeTransport implements dummy interface for Transport.'''
# Local serial port loopback: socat PTY,link=COM8 PTY,link=COM9
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
def _write(self, msg):
pass
def _read(self):
raise NotImplementedException("Not implemented")