summaryrefslogtreecommitdiff
path: root/src/match_up
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2024-11-15 18:11:17 +0100
committerKaran Jayachandra <mail@karanjayachandra.com>2024-11-15 18:11:17 +0100
commit220911e4e6c117c61885853edcf2b0dfa14cdf27 (patch)
treeb57f9b79c375f2f9580c8dd339b5cb470872b5e9 /src/match_up
parentc4a4e35f93f18a13c6e4fc1401caad2b095a7ea7 (diff)
Added the database file name to the path command
Diffstat (limited to 'src/match_up')
-rw-r--r--src/match_up/model.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/match_up/model.py b/src/match_up/model.py
index b11622d..396c188 100644
--- a/src/match_up/model.py
+++ b/src/match_up/model.py
@@ -47,8 +47,8 @@ class PlayerList:
guest_count: dict = {1: 0, 3: 0, 5: 0}
def __init__(self, csv_location=None) -> None:
- with path("match_up") as p:
- self.db_location = join(p, "players.db")
+ with path("match_up", "players.db") as p:
+ self.db_location = p
db_file_found = True
if not isfile(self.db_location):
db_file_found = False
@@ -60,7 +60,7 @@ class PlayerList:
_init_random_database(self.session)
def _init_database(self):
- engine = create_engine("sqlite:///" + self.db_location)
+ engine = create_engine("sqlite:///" + str(self.db_location))
BASE.metadata.create_all(bind=engine)
self.session = sessionmaker(bind=engine)()