From 9d4f4e1ae2c00f6b01aeff5b8f91e7ca10844cbb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 9 May 2021 14:05:52 -0300 Subject: Attempt to be more fault-tolerant to world_pass errors. Still getting weird fancy URLLIB errors, though --- game/renpy.rpy | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/game/renpy.rpy b/game/renpy.rpy index 92ccc39..a5b3681 100644 --- a/game/renpy.rpy +++ b/game/renpy.rpy @@ -94,13 +94,16 @@ label start: auth = {"vaultId": vaultId, "token": vaultToken, "world": persistent.serverlist[_return]["UUID"]} - r=requests.post(VAULT_HOST+"/world_pass", json=auth, timeout=15.0) - if r.status_code != 200: - stdout("Get World Auth - Returned error code %d" % r.status_code) - PWD="" - else: - auth2=r.json() - PWD=" -U %s -P %s" % (auth2["user"], auth2["pass"]) + PWD="" + try: + r=requests.post(VAULT_HOST+"/world_pass", json=auth, timeout=15.0) + if r.status_code != 200: + stdout("Get World Auth - Returned error code %d" % r.status_code) + else: + auth2=r.json() + PWD=" -U %s -P %s" % (auth2["user"], auth2["pass"]) + except: + pass ## Minimize to tray if set if not renpy.mobile and persistent.iconify: -- cgit v1.2.3-70-g09d2