Skip to content

Commit

Permalink
Change requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Shutgun committed Dec 2, 2020
1 parent 73bb964 commit cf7074c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion devolo_plc_api/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion devolo_plc_api/network/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit cf7074c

Please sign in to comment.