fix rwf containing no 'progression' key
This commit is contained in:
@@ -125,7 +125,7 @@ class TSbot:
|
|||||||
commands.ticker(self, "")
|
commands.ticker(self, "")
|
||||||
|
|
||||||
# Hijacked for WoW
|
# Hijacked for WoW
|
||||||
# commands.rwf(self)
|
commands.rwf(self)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|||||||
+7
-2
@@ -3,8 +3,8 @@ TBD
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = "Lukas Mahler"
|
__author__ = "Lukas Mahler"
|
||||||
__version__ = "0.0.2"
|
__version__ = "0.0.3"
|
||||||
__date__ = "08.04.2022"
|
__date__ = "14.04.2022"
|
||||||
__email__ = "m@hler.eu"
|
__email__ = "m@hler.eu"
|
||||||
__status__ = "Development"
|
__status__ = "Development"
|
||||||
|
|
||||||
@@ -204,6 +204,7 @@ def rwf(self):
|
|||||||
req = requests.get(url)
|
req = requests.get(url)
|
||||||
|
|
||||||
if req.status_code != 200:
|
if req.status_code != 200:
|
||||||
|
self.pipeOut(req.status_code)
|
||||||
return
|
return
|
||||||
|
|
||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
@@ -211,6 +212,10 @@ def rwf(self):
|
|||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if "progression" not in data:
|
||||||
|
self.pipeOut(data)
|
||||||
|
return
|
||||||
|
|
||||||
prog_done = 0
|
prog_done = 0
|
||||||
prog_max = len(data['progression'])
|
prog_max = len(data['progression'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user