explicitly state the addess family type when checking them

This commit is contained in:
study-faraphel 2025-01-07 10:24:05 +01:00
parent 88f1c4cba4
commit a4ca2865c4

View file

@ -244,14 +244,14 @@ class CommunicationManager:
interface_family, _, _, _, interface_address = interface
match interface_family:
case socket.AF_INET:
case socket.AddressFamily.AF_INET:
interface_host, interface_port = interface_address
# check if it matches the address interface
if host == interface_host:
return True
case socket.AF_INET6:
case socket.AddressFamily.AF_INET6:
interface_host, interface_port, interface_flowinfo, interface_scope = interface_address
# check if it matches the address interface