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