From a4ca2865c4cd158d9172ff98e87116179350cbc5 Mon Sep 17 00:00:00 2001 From: study-faraphel Date: Tue, 7 Jan 2025 10:24:05 +0100 Subject: [PATCH] explicitly state the addess family type when checking them --- source/managers/CommunicationManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/managers/CommunicationManager.py b/source/managers/CommunicationManager.py index 5aeb224..1e44f3b 100644 --- a/source/managers/CommunicationManager.py +++ b/source/managers/CommunicationManager.py @@ -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