mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +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:
|
if r.status_code != 200:
|
||||||
raise RequestError(f"OWAPI.net returned {r.status_code}")
|
raise RequestError(f"OWAPI.net returned {r.status_code}")
|
||||||
try:
|
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:
|
except TypeError:
|
||||||
raise RequestError("Something went wrong when retrieving the stats.")
|
raise RequestError("Something went wrong when retrieving the stats.")
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue