From f82ec7a80e83c4e71e453fe2c409c3179989ad2e Mon Sep 17 00:00:00 2001 From: David Date: Wed, 4 Jan 2023 12:59:01 +0100 Subject: [PATCH] Correction typo --- statistiques/parseStats.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/statistiques/parseStats.py b/statistiques/parseStats.py index 277ebc5..180d667 100755 --- a/statistiques/parseStats.py +++ b/statistiques/parseStats.py @@ -203,9 +203,16 @@ def runMain(): stats = Stats(year,mois) res = stats.parse() for (k,v) in res.items(): - i = STATS_TOT_FIELDS.index(k) - fr = STATS_FR_TOT_FIELDS[i] - print(f"{fr}={v}") + if k in STATS_TOT_FIELDS: + i = STATS_TOT_FIELDS.index(k) + fr = STATS_FR_TOT_FIELDS[i] + print(f"{fr}={v}") + elif k in STATS_MAX_FIELDS: + i = STATS_MAX_FIELDS.index(k) + fr = STATS_FR_MAX_FIELDS[i] + print(f"{fr}={v}") + else: + pass try: moyenne_part = int(res['total_participants']) / int(res['total_conferences_completed']) moyenne_part = int((moyenne_part + 0.5) * 10) / 10