Skip to content

Commit

Permalink
Avoid checking for metered network, if there is no wifi
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu committed Nov 18, 2024
1 parent 6bec467 commit 880df91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vorta/network_status/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 880df91

Please sign in to comment.