From b57ab3aff87d1647df36e33c051955060a55fd01 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 21 Dec 2022 09:53:34 +0100 Subject: [PATCH] Ajout message d'erreur --- statistiques/parseStats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/statistiques/parseStats.py b/statistiques/parseStats.py index 49d13ae..3a6e23b 100755 --- a/statistiques/parseStats.py +++ b/statistiques/parseStats.py @@ -85,6 +85,8 @@ class Stats: res = self.db.dbQuery(f"""SELECT * FROM {dbName} WHERE timestamp > {self.startDate} AND timestamp < {self.endDate} ORDER by id""") consolided = {} moy_conf_by_day = 0 + if res is None: + sys.exit('Traitement en cours, base de données indisponible') for line in res: field = line[2] if field in STATS_TOT_FIELDS: