From 702d150a23a816ca70cb7c637b5a3cd512820d3b Mon Sep 17 00:00:00 2001 From: Hofei90 <29521028+Hofei90@users.noreply.github.com> Date: Fri, 29 Jan 2021 12:29:37 +0100 Subject: [PATCH] fix Error when profil not correct configurated --- get_cod_stats.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/get_cod_stats.py b/get_cod_stats.py index 8287172..1e158a3 100644 --- a/get_cod_stats.py +++ b/get_cod_stats.py @@ -78,7 +78,11 @@ def get_hc_domination_stats(stats, user): def get_standard_statistik(url, user): url = url.format(user) - data = get_json_data(url)["data"] + json_data = get_json_data(url) + if not json_data["data"]: + return + else: + data = json_data["data"] check_user(user) stats = data["segments"][0]["stats"]