Skip to content

Commit

Permalink
prevent ".db.db"
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeffeg committed Dec 10, 2021
1 parent 8d79106 commit 3323df2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/DatabaseConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down

0 comments on commit 3323df2

Please sign in to comment.