From: Antonio Ospite Date: Sat, 2 Jan 2016 15:20:59 +0000 (+0100) Subject: CallDistanceTransceiver.py: make DummyModem look more like Modem X-Git-Url: https://git.ao2.it/SaveMySugar/python3-savemysugar.git/commitdiff_plain/4f26f1091ababb3a719f76b47bb6d24eb41ba59a?ds=inline;hp=78fd1e817fd08b35b4e04d3315374c9c9bc0d898 CallDistanceTransceiver.py: make DummyModem look more like Modem The "response" argument is optional in the get_response() method, this avoids getting an error when trying to transmit with DummyModem: TypeError: get_response() missing 1 required positional argument: 'response' --- diff --git a/src/savemysugar/CallDistanceTransceiver.py b/src/savemysugar/CallDistanceTransceiver.py index 588c985..6361afa 100755 --- a/src/savemysugar/CallDistanceTransceiver.py +++ b/src/savemysugar/CallDistanceTransceiver.py @@ -424,7 +424,7 @@ def test_send_receive(): def send_command(self, command): pass - def get_response(self, response): + def get_response(self, response=None): # pylint: disable=unused-argument setup_time = random.uniform(self.transceiver.modulator.period_min,