Skip to content

Commit 20e3fd9

Browse files
committed
Added default parameter to pass the tests
1 parent 6aa9e44 commit 20e3fd9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

osdp/_bus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def send_command(self, command: Command):
4444
else:
4545
log.warning("Device not found with address %s", command.address)
4646

47-
def add_device(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes) -> Device:
47+
def add_device(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes = None) -> Device:
4848
found_device = self._configured_devices.get(address)
4949
self._configured_devices_lock.acquire()
5050
if found_device is not None:

osdp/_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class Device(object):
1515

16-
def __init__(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes):
16+
def __init__(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes = None):
1717
self._use_secure_channel = use_secure_channel
1818
self.address = address
1919
self.message_control = Control(0, use_crc, use_secure_channel)

0 commit comments

Comments
 (0)