fix rwf containing no 'progression' key

This commit is contained in:
lm
2022-04-14 00:13:30 +02:00
parent 710c570c8d
commit b22d16e364
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ class TSbot:
commands.ticker(self, "")
# Hijacked for WoW
# commands.rwf(self)
commands.rwf(self)
else:
pass
+7 -2
View File
@@ -3,8 +3,8 @@ TBD
"""
__author__ = "Lukas Mahler"
__version__ = "0.0.2"
__date__ = "08.04.2022"
__version__ = "0.0.3"
__date__ = "14.04.2022"
__email__ = "m@hler.eu"
__status__ = "Development"
@@ -204,6 +204,7 @@ def rwf(self):
req = requests.get(url)
if req.status_code != 200:
self.pipeOut(req.status_code)
return
data = json.loads(req.text)
@@ -211,6 +212,10 @@ def rwf(self):
if not data:
return
if "progression" not in data:
self.pipeOut(data)
return
prog_done = 0
prog_max = len(data['progression'])