Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip network adapters that are disconnected #327

Merged
merged 8 commits into from Jun 22, 2021

Conversation

ZLJasonG
Copy link

@ZLJasonG ZLJasonG commented Feb 9, 2021

Don't fail to initialise if a network adapter is disconnected.

fixes #326

Don't fail to initialise if a network adapter is disconnected.
@ZLJasonG
Copy link
Author

ZLJasonG commented Feb 9, 2021

#326

@coveralls
Copy link

coveralls commented Feb 9, 2021

Coverage Status

Coverage decreased (-0.1%) to 93.642% when pulling 2727f45 on ZLJasonG:patch-1 into 5e268fa on jstasiak:master.

Copy link
Collaborator

@jstasiak jstasiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Two small comments, looks good otherwise.

zeroconf/__init__.py Outdated Show resolved Hide resolved
zeroconf/__init__.py Outdated Show resolved Hide resolved
And actually use the interface formatting parameter
@bdraco bdraco changed the title Update __init__.py Skip network adapters that are disconnected May 3, 2021
@bdraco
Copy link
Member

bdraco commented May 3, 2021

@ZLJasonG would you please rebase this PR to the latest master?

@bdraco
Copy link
Member

bdraco commented May 27, 2021

fixes #326

@bdraco bdraco linked an issue May 27, 2021 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented May 27, 2021

Codecov Report

Merging #327 (877559c) into master (662ed61) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head 877559c differs from pull request most recent head fe65d5b. Consider uploading reports for the commit fe65d5b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #327      +/-   ##
==========================================
- Coverage   98.72%   98.68%   -0.04%     
==========================================
  Files          22       22              
  Lines        2271     2279       +8     
  Branches      389      389              
==========================================
+ Hits         2242     2249       +7     
  Misses         18       18              
- Partials       11       12       +1     
Impacted Files Coverage Δ
zeroconf/_utils/aio.py 96.00% <0.00%> (-2.00%) ⬇️
zeroconf/_dns.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 662ed61...fe65d5b. Read the comment docs.

@bdraco bdraco changed the title Skip network adapters that are disconnected Skip network adapters that are disconnected on win32 Jun 22, 2021
@bdraco bdraco force-pushed the patch-1 branch 2 times, most recently from 1c868c1 to 18e32c1 Compare June 22, 2021 00:04
@bdraco
Copy link
Member

bdraco commented Jun 22, 2021

Looks like WSAENOPROTOOPT is mapped to ENOPROTOOPT

https://github.com/python/cpython/blob/main/Modules/errnomodule.c#L253

@bdraco bdraco changed the title Skip network adapters that are disconnected on win32 Skip network adapters that are disconnected Jun 22, 2021
@bdraco bdraco merged commit df66da2 into python-zeroconf:master Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disconnected network adapters cause initialisation to fail
5 participants