Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Remove netifaces lib reference #215

Merged
merged 1 commit into from
Sep 19, 2018
Merged

Remove netifaces lib reference #215

merged 1 commit into from
Sep 19, 2018

Conversation

awarecan
Copy link
Contributor

@awarecan awarecan commented Sep 18, 2018

Since 0.21.0, zeroconf replaced the usage of netifaces by ifaddr

Use zeroconf.interface_addresses to replace util.interface_addresses method. So that we can remove the depends of netifaces lib

fixes #214

Need help to test on real device supports SSDP protocol.

@balloob balloob merged commit 4307d90 into master Sep 19, 2018
@balloob balloob deleted the remove-netifaces branch September 19, 2018 13:33
@jaharkes
Copy link
Contributor

This change broke discovery for me, I am seeing the following traceback.

2018-09-23 23:55:54 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/discovery.py", line 168, in scan_devices
    results = await hass.async_add_job(_discover, netdisco)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/discovery.py", line 194, in _discover
    netdisco.scan()
  File "/usr/local/lib/python3.6/site-packages/netdisco/discovery.py", line 57, in scan
    self.ssdp.scan()
  File "/usr/local/lib/python3.6/site-packages/netdisco/ssdp.py", line 41, in scan
    self.update()
  File "/usr/local/lib/python3.6/site-packages/netdisco/ssdp.py", line 89, in update
    entry for entry in scan()
  File "/usr/local/lib/python3.6/site-packages/netdisco/ssdp.py", line 225, in scan
    for addr in zeroconf.get_all_addresses():
TypeError: get_all_addresses() missing 1 required positional argument: 'address_family'

@balloob
Copy link
Collaborator

balloob commented Sep 24, 2018

Fixed in 0.78.3 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zeroconf use ifaddr replaced netifaces since 0.21.0
4 participants