We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 91b1514 + cfc2014 commit e05dc3dCopy full SHA for e05dc3d
wsdiscovery/util.py
@@ -257,14 +257,14 @@ def _getNetworkAddrs(protocol_version):
257
if protocol_version == socket.AF_INET:
258
for iface in ifaces:
259
for ip in iface.ips:
260
- if type(ip.ip) is string:
+ if isinstance(ip.ip, str):
261
ip_address = ipaddress.ip_address(ip.ip)
262
if not ip_address.is_loopback:
263
addrs.append(ip_address)
264
elif protocol_version == socket.AF_INET6:
265
266
267
- if type(ip.ip) is tuple:
+ if isinstance(ip.ip, tuple):
268
ip_address = ipaddress.ip_address(f"{ip.ip[0]}%{ip.ip[2]}")
269
270
0 commit comments