From ef03b2ab7ed1731ecc319d19be6c882681cc5b2b Mon Sep 17 00:00:00 2001 From: David Date: Wed, 4 Jan 2023 12:46:28 +0100 Subject: [PATCH] config test --- statistiques/parseStats.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/statistiques/parseStats.py b/statistiques/parseStats.py index e813151..c84213b 100755 --- a/statistiques/parseStats.py +++ b/statistiques/parseStats.py @@ -109,21 +109,17 @@ class Stats: if field in consolided: if consolided[field] < int(line[3]): consolided[field] = int(line[3]) - temp_cons = {} - for (k,v) in consolided.items(): - temp_cons[k] = v + temp_keys = list(consolided.keys()) + for k in keys: if 'bytes' in k: (v,u) = self.__conv(consolided[k]) - temp_cons[k] = f"{v} {u}" + consolided[k] = f"{v} {u}" if 'seconds' in k: (v,u) = self.__conv(consolided[k],dataType='t') consolided.pop(k) n_k = k.replace('_seconds','_time') - temp_cons[n_k] = f"{v} {u}" + consolided[n_k] = f"{v} {u}" - for (k,v) in temp_cons.items(): - consolided[k] = temp_cons[k] - if moy_conf_by_day > 1: tot = consolided['conferences'] moy_conf_by_day = int(moy_conf_by_day / 12 + 0.5)