mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Merge remote-tracking branch 'origin/noai' into noai
This commit is contained in:
@ -70,7 +70,12 @@ class ohcapi(plugins.Plugin):
|
||||
return
|
||||
|
||||
# Check if the internet is still available by pinging Google
|
||||
response = requests.get('https://www.google.com', timeout=5)
|
||||
try:
|
||||
response = requests.get('https://www.google.com', timeout=5)
|
||||
except requests.ConnectionError:
|
||||
self.internet_active = False
|
||||
return
|
||||
|
||||
if response.status_code == 200:
|
||||
self.internet_active = True
|
||||
else:
|
||||
|
Reference in New Issue
Block a user