Skip to content

Commit 64586df

Browse files
authored
Avoid checking for metered network, if there is no wifi (#2141)
1 parent 6bec467 commit 64586df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vorta/network_status/darwin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
class DarwinNetworkStatus(NetworkStatusMonitor):
1212
def is_network_metered(self) -> bool:
1313
interface: CWInterface = self._get_wifi_interface()
14+
15+
# If there is no Wifi at all.
16+
if interface is None:
17+
return False
18+
1419
network: Optional[CWNetwork] = interface.lastNetworkJoined()
1520

1621
if network:

0 commit comments

Comments
 (0)