From 880df91e6bc94a6b7bf49525c3b1ff6afb7c9bb0 Mon Sep 17 00:00:00 2001 From: Manu Date: Mon, 18 Nov 2024 11:45:30 +0000 Subject: [PATCH] Avoid checking for metered network, if there is no wifi --- src/vorta/network_status/darwin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vorta/network_status/darwin.py b/src/vorta/network_status/darwin.py index 1ee2baf1..ec1fd424 100644 --- a/src/vorta/network_status/darwin.py +++ b/src/vorta/network_status/darwin.py @@ -11,6 +11,11 @@ class DarwinNetworkStatus(NetworkStatusMonitor): def is_network_metered(self) -> bool: interface: CWInterface = self._get_wifi_interface() + + # If there is no Wifi at all. + if interface is None: + return False + network: Optional[CWNetwork] = interface.lastNetworkJoined() if network: