mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-04-24 07:27:33 -05:00
add message when network is unavailable (#148)
Co-authored-by: frozenpandaman <7245874+frozenpandaman@users.noreply.github.com>
This commit is contained in:
parent
56099581a3
commit
718fa4adaf
7
iksm.py
7
iksm.py
|
|
@ -77,7 +77,12 @@ def get_web_view_ver(bhead=[], gtoken=""):
|
|||
if gtoken:
|
||||
app_cookies["_gtoken"] = gtoken # X-GameWebToken
|
||||
|
||||
home = requests.get(SPLATNET3_URL, headers=app_head, cookies=app_cookies)
|
||||
try:
|
||||
home = requests.get(SPLATNET3_URL, headers=app_head, cookies=app_cookies)
|
||||
except requests.exceptions.ConnectionError:
|
||||
print("Could not connect to network. Please try again.")
|
||||
sys.exit(1)
|
||||
|
||||
if home.status_code != 200:
|
||||
return WEB_VIEW_VER_FALLBACK
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user