From 20e3fd9521f3658c46f2d01b47f64aba5242566c Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 29 Oct 2020 19:22:25 +1300 Subject: [PATCH] Added default parameter to pass the tests --- osdp/_bus.py | 2 +- osdp/_device.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osdp/_bus.py b/osdp/_bus.py index 111f266..418779a 100644 --- a/osdp/_bus.py +++ b/osdp/_bus.py @@ -44,7 +44,7 @@ def send_command(self, command: Command): else: log.warning("Device not found with address %s", command.address) - def add_device(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes) -> Device: + def add_device(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes = None) -> Device: found_device = self._configured_devices.get(address) self._configured_devices_lock.acquire() if found_device is not None: diff --git a/osdp/_device.py b/osdp/_device.py index 5260d8a..f6c7517 100644 --- a/osdp/_device.py +++ b/osdp/_device.py @@ -13,7 +13,7 @@ class Device(object): - def __init__(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes): + def __init__(self, address: int, use_crc: bool, use_secure_channel: bool, master_key: bytes = None): self._use_secure_channel = use_secure_channel self.address = address self.message_control = Control(0, use_crc, use_secure_channel)