Skip to content

Commit 8ef36d1

Browse files
committed
Make IP version dispatch compatible with Python 3.14
Some properties moved from the object to the class, see python/cpython#120698 Change-Id: I81927998586a4338b72da7e6238cad45874d2a06
1 parent f639a65 commit 8ef36d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/cmk-ec/cmk/ec/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def unmap_ipv4_address(ip_address: str) -> str:
265265
"""
266266
with contextlib.suppress(ValueError): # in case address[0] is a hostname
267267
host = ipaddress.ip_address(ip_address)
268-
if host.version == 6 and host.ipv4_mapped:
268+
if isinstance(host, ipaddress.IPv6Address) and host.ipv4_mapped:
269269
return str(host.ipv4_mapped)
270270
return ip_address
271271

0 commit comments

Comments
 (0)