Ensure network check doesn't fail on importing fcntl on Windows#8459
Merged
Conversation
bkabrda
force-pushed
the
slavek.kabrda/network-fcntl-fix
branch
from
January 26, 2021 12:53
37fd5c1 to
bb44f35
Compare
coignetp
requested changes
Jan 26, 2021
coignetp
left a comment
Contributor
There was a problem hiding this comment.
Note: since the integration is not yet refactored to parse the configuration in the constructor, the exception will be raised in the check method. I think it's fine for now.
Co-authored-by: Paul <[email protected]>
coignetp
approved these changes
Jan 26, 2021
julien-lebot
approved these changes
Jan 26, 2021
florimondmanca
pushed a commit
that referenced
this pull request
Jan 26, 2021
* Ensure network check doesn't fail on importing fcntl on Windows * test * Add network to windows ci * Remove extra blank line * Update test-all-checks * Fix display name * Update network/datadog_checks/network/network.py Co-authored-by: Paul <[email protected]> Co-authored-by: Paul Coignet <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
fcntlis not importable on Windows, so we have to create a try/except clause for its import so that the check itself is importable on Windows.Motivation
Additional Notes
Review checklist (to be filled by reviewers)
changelog/andintegration/labels attached