removing useless package

This commit is contained in:
Mylloon 2021-06-03 09:03:01 +02:00
parent 23f35535a3
commit 28f2e1da89

View file

@ -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: