From ba6e7a3c303756b2b75cac125d6e1217238705fe Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Thu, 23 Jan 2025 15:18:33 +0100 Subject: [PATCH] reset broadcast addr in the ntuple only if not None --- psutil/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/psutil/__init__.py b/psutil/__init__.py index 3bbec9760..cf4a58057 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -2247,7 +2247,8 @@ def net_if_addrs(): except Exception as err: # noqa: BLE001 debug(err) else: - nt._replace(broadcast=broadcast) + if broadcast is not None: + nt._replace(broadcast=broadcast) ret[name].append(nt)