1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

tracer bugfix

This commit is contained in:
Steffo 2018-08-28 17:45:07 +02:00
parent a5fd96faa6
commit e89aa5e2cf

5
db.py
View file

@ -568,7 +568,10 @@ class Overwatch(Base):
if r.status_code != 200:
raise RequestError(f"OWAPI.net returned {r.status_code}")
try:
j = r.json()["eu"]["stats"]["competitive"]["overall_stats"]
j = r.json()["eu"]["stats"].get("competitive")
if j is None:
raise RequestError("Something went wrong when retrieving the stats.")
j = j["overall_stats"]
except TypeError:
raise RequestError("Something went wrong when retrieving the stats.")
try: