From cf7074c2ca2149485f927238e3635e9f450f26b1 Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Wed, 2 Dec 2020 10:51:30 +0100 Subject: [PATCH] Change requested --- README.md | 2 +- devolo_plc_api/device.py | 2 +- devolo_plc_api/network/__init__.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bbf9f20..2f1dfd4 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ devices = await async_discover_network() await asyncio.gather(*[device.async_disconnect() for device in devices.values()]) ``` -Or in a synchronious setup: +Or in a synchronous setup: ```python from devolo_plc_api.network import discover_network diff --git a/devolo_plc_api/device.py b/devolo_plc_api/device.py index 0adcbe3..127084e 100644 --- a/devolo_plc_api/device.py +++ b/devolo_plc_api/device.py @@ -168,7 +168,7 @@ def info_from_service(service_info: ServiceInfo) -> Optional[Dict]: """Return prepared info from mDNS entries.""" properties = {} if not service_info.addresses: - return None # No need to continue, if there is no IP address to contact the device + return # No need to continue, if there is no IP address to contact the device total_length = len(service_info.text) offset = 0 diff --git a/devolo_plc_api/network/__init__.py b/devolo_plc_api/network/__init__.py index f8f9b80..c278dc7 100644 --- a/devolo_plc_api/network/__init__.py +++ b/devolo_plc_api/network/__init__.py @@ -22,7 +22,8 @@ def discover_network() -> Dict[str, Device]: browser = ServiceBrowser(Zeroconf(), "_dvl-deviceapi._tcp.local.", [_add]) time.sleep(3) browser.cancel() - [device.connect() for device in _devices.values()] # pylint: disable=expression-not-assigned + for device in _devices.values(): + device.connect() return _devices