From 28f2e1da8945ed757b8f1f441cdd0462eb3a021f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 3 Jun 2021 09:03:01 +0200 Subject: [PATCH] removing useless package --- src/utils/db.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/db.py b/src/utils/db.py index bc280c8..6a7f21e 100644 --- a/src/utils/db.py +++ b/src/utils/db.py @@ -1,10 +1,9 @@ import sqlite3 -from pathlib import Path class Database: def __init__(self): - path = Path("src/db/bot.sqlite3").absolute() + path = "src/db/bot.sqlite3" if not self.isDatabaseExists(path): self.createDB(path) self.con = sqlite3.connect(path) @@ -12,7 +11,7 @@ class Database: def isDatabaseExists(self, path): try: - Path(path).resolve(strict = True) + open(path, "r") except FileNotFoundError: return False else: