diff --git a/statistiques/parseStats.py b/statistiques/parseStats.py index 770902e..d78cb09 100755 --- a/statistiques/parseStats.py +++ b/statistiques/parseStats.py @@ -206,8 +206,11 @@ def runMain(): print(f"Moyenne participants par conference={moyenne_part}") except: pass - moyenne_duree = float(res['total_conference_time'].split()[0]) * 60 / int(res['total_conferences_completed']) - moyenne_duree = int((moyenne_duree + 0.5) * 10) / 10 + if res.has_key('total_conference_time'): + moyenne_duree = float(res['total_conference_time'].split()[0]) * 60 / int(res['total_conferences_completed']) + moyenne_duree = int((moyenne_duree + 0.5) * 10) / 10 + else: + moyenne_duree = 0 print(f"duree moyenne des conferences={moyenne_duree} min")