-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Bugfix/rework: IPv6 scope errors (bp) #49815
Bugfix/rework: IPv6 scope errors (bp) #49815
Conversation
This cannot be detected with type comparison, because bytes == str and at the same time bytes != str if compatibility is not around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me except the skipIf
in tests, it looks you've reverted the bool logic.
tests/unit/modules/test_network.py
Outdated
@@ -276,7 +267,7 @@ def test_connect(self): | |||
self.assertDictEqual(network.connect('host', 'port'), | |||
{'comment': ret, 'result': True}) | |||
|
|||
@skipIf(HAS_IPADDRESS is False, 'unable to import \'ipaddress\'') | |||
@skipIf(bool(ipaddress), 'unable to import \'ipaddress\'') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skipIf(not ipaddress, ...
?
tests/unit/modules/test_network.py
Outdated
@@ -288,7 +279,7 @@ def test_is_private(self): | |||
return_value=True): | |||
self.assertTrue(network.is_private('::1')) | |||
|
|||
@skipIf(HAS_IPADDRESS is False, 'unable to import \'ipaddress\'') | |||
@skipIf(bool(ipaddress), 'unable to import \'ipaddress\'') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skipIf(not ipaddress, ...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
One-to-one (almost) backport of bugfix, available at #49705