mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
tracer bugfix
This commit is contained in:
parent
a5fd96faa6
commit
e89aa5e2cf
1 changed files with 4 additions and 1 deletions
5
db.py
5
db.py
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue