From d48981c430c487b6b34af5dae077563fcfa652d0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 10 May 2021 22:26:25 -0300 Subject: Ignore M+ errors. If Vault sends a 403, do not launch a subworld --- game/client.rpy | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/game/client.rpy b/game/client.rpy index 459711c..2565edc 100644 --- a/game/client.rpy +++ b/game/client.rpy @@ -39,11 +39,15 @@ init 2 python: PWD="" try: r=vault.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: + if r.status_code == 200: auth2=r.json() PWD=" -U %s -P %s" % (auth2["user"], auth2["pass"]) + elif r.status_code == 403: + stdout("Warning: Connection was refused (Vault logout?)") + responsive = False + return + else: + stdout("Get World Auth - Returned error code %d" % r.status_code) except: pass @@ -58,8 +62,8 @@ init 2 python: app=execute("%s %s%s" % (CMD, OPT, PWD), shell=True) if app: traceback.print_exc() - stdout("An error happened: %d" % app) - responsive = False + stdout("[CLIENT] An error happened: %d" % app) + #responsive = False # NOTE: Now we would like to un-minimize ourselves # But we cannot =/ -- cgit v1.2.3-70-g09d2