From c9d2c365d5e2ecc92a064490a7cd90a18b2bfc3c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 19 Dec 2022 14:08:02 +0100 Subject: [PATCH] config test --- statistiques/parseStats_ng.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/statistiques/parseStats_ng.py b/statistiques/parseStats_ng.py index 8f3803d..b281a5a 100755 --- a/statistiques/parseStats_ng.py +++ b/statistiques/parseStats_ng.py @@ -133,10 +133,13 @@ class SQLite: self.conn.close() def dbQuery(self,query='SELECT'): - self.__openDb() - self.cursor.execute(query) - rows = self.cursor.fetchall() - self.__closeDb() + try: + self.__openDb() + self.cursor.execute(query) + rows = self.cursor.fetchall() + self.__closeDb() + except sqlite3.OperationalError: + rows = None return rows def dbInsert(self,ts,k,v):