mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
#14814: Use correct comparison for IP addresses
ipaddress._BaseV4.is_unspecified() compared IP addresses using "in" which fails.
This commit is contained in:
parent
7d74effc67
commit
bcd304480f
2 changed files with 2 additions and 1 deletions
|
@ -1130,7 +1130,7 @@ class _BaseV4:
|
|||
"""
|
||||
unspecified_address = IPv4Address('0.0.0.0')
|
||||
if isinstance(self, _BaseAddress):
|
||||
return self in unspecified_address
|
||||
return self == unspecified_address
|
||||
return (self.network_address == self.broadcast_address ==
|
||||
unspecified_address)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue