summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-09 21:30:30 -0300
committerJesusaves <cpntb1@ymail.com>2021-05-09 21:30:30 -0300
commit757a349f9bfe304a2fe95961afbfd9e11c8fb3e7 (patch)
tree2182713a77679ce4827f24fa5568b91c665d01d5
parent556ae49619ac347f8b8ff6f2146a6f85d6fb7f6d (diff)
downloadrenpy-757a349f9bfe304a2fe95961afbfd9e11c8fb3e7.tar.gz
renpy-757a349f9bfe304a2fe95961afbfd9e11c8fb3e7.tar.bz2
renpy-757a349f9bfe304a2fe95961afbfd9e11c8fb3e7.tar.xz
renpy-757a349f9bfe304a2fe95961afbfd9e11c8fb3e7.zip
Improved fault tolerance at new code, but still far from good.
-rw-r--r--game/update.rpy22
1 files changed, 14 insertions, 8 deletions
diff --git a/game/update.rpy b/game/update.rpy
index a64d12f..0e4b35b 100644
--- a/game/update.rpy
+++ b/game/update.rpy
@@ -371,21 +371,27 @@ label register:
return
# Check if we have success
- $ status_update(pc=98)
- $ stdout("Vault result: (%d) %s" % (r.status_code, ifte(config.developer, r.text, "OK")))
- $ auth2 = r.json()
- $ vaultId = auth2["vaultId"]
- $ vaultToken = auth2["token"]
+ python:
+ try:
+ status_update(pc=98)
+ stdout("Vault result: (%d) %s" % (r.status_code, ifte(config.developer, r.text, "OK")))
+ auth2 = r.json()
+ vaultId = auth2["vaultId"]
+ vaultToken = auth2["token"]
+ except:
+ traceback.print_exc()
+ stdout("Error - Vault result is bad.")
$ del data
$ del code2FA
- if vaultId:
- $ status_update("Success!", 100)
############
## Cleanup
$ del method
$ del email
- $ status_update(pc=100)
+ if vaultId:
+ $ status_update("Success!", 100)
+ else:
+ $ status_update("{color=#F00}Failure!{/color}", pc=100)
return