From 3323df283db1aac5061fd7ea88b5dfb128d9ee76 Mon Sep 17 00:00:00 2001 From: ElJeffe Date: Fri, 10 Dec 2021 14:41:59 -0500 Subject: [PATCH] prevent ".db.db" --- libs/DatabaseConnection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/DatabaseConnection.py b/libs/DatabaseConnection.py index b851cb9a..f70f40aa 100644 --- a/libs/DatabaseConnection.py +++ b/libs/DatabaseConnection.py @@ -103,7 +103,9 @@ def _sqlite(self): db_name = self.database if not len(db_name): db_name = "rtb" - return "sqlite:///%s.db" % db_name + if not db_name.endswith(".db"): + db_name = "%s.db" % db_name + return "sqlite:///%s" % db_name def _mysql(self): """ Configure db_connection for MySQL """