diff --git a/src/db_function/init_db.py b/src/db_function/init_db.py index 6d7c6c2..99444da 100644 --- a/src/db_function/init_db.py +++ b/src/db_function/init_db.py @@ -2,7 +2,7 @@ import sqlite3 def init_db(): - os.mkdir(os.getenv('DATA_PATH')) + if not os.path.exists(os.getenv('DATA_PATH')): os.mkdir(os.getenv('DATA_PATH')) conn = sqlite3.connect(f"{os.getenv('DATA_PATH')}tracked_accounts.db") cursor = conn.cursor() cursor.executescript("""