check webpage

This commit is contained in:
George Hotz 2018-02-14 15:27:10 -08:00
parent 4f59dedcb0
commit 4363b3e5ef
1 changed files with 5 additions and 0 deletions

View File

@ -49,7 +49,12 @@ def _connect_wifi(dongle_id, pw):
assert cnt < MAX_TRIES
if "-pair" in wifi_scan[0]:
os.system("nmcli d wifi connect %s-pair" % (ssid))
# fetch webpage
print "connecting to insecure network to secure"
r = requests.get("http://192.168.0.10/")
assert r.status_code==200
print "securing"
try:
r = requests.get("http://192.168.0.10/secure", timeout=0.01)
except requests.exceptions.Timeout: