1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-22 07:43:09 +00:00

Avoid checking for metered network, if there is no wifi

This commit is contained in:
Manu 2024-11-18 11:45:30 +00:00
parent 6bec467e44
commit 880df91e6b

View file

@ -11,6 +11,11 @@
class DarwinNetworkStatus(NetworkStatusMonitor): class DarwinNetworkStatus(NetworkStatusMonitor):
def is_network_metered(self) -> bool: def is_network_metered(self) -> bool:
interface: CWInterface = self._get_wifi_interface() interface: CWInterface = self._get_wifi_interface()
# If there is no Wifi at all.
if interface is None:
return False
network: Optional[CWNetwork] = interface.lastNetworkJoined() network: Optional[CWNetwork] = interface.lastNetworkJoined()
if network: if network: