Don't create DBs during schema check if they don't exist
This commit is contained in:
parent
02fecc4e0a
commit
b9a1203491
@ -38,6 +38,9 @@ class SqliteSessionManager(SimpleSessionManager):
|
|||||||
self._ensure_schema_up_to_date()
|
self._ensure_schema_up_to_date()
|
||||||
|
|
||||||
def _ensure_schema_up_to_date(self):
|
def _ensure_schema_up_to_date(self):
|
||||||
|
if not os.path.exists(self.session_db_path):
|
||||||
|
return True
|
||||||
|
|
||||||
conn = self._conn()
|
conn = self._conn()
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
cursor.execute("SELECT * FROM sqlite_master "
|
cursor.execute("SELECT * FROM sqlite_master "
|
||||||
|
|||||||
@ -49,6 +49,9 @@ class SqliteUserManager(SimpleUserManager):
|
|||||||
self._ensure_schema_up_to_date()
|
self._ensure_schema_up_to_date()
|
||||||
|
|
||||||
def _ensure_schema_up_to_date(self):
|
def _ensure_schema_up_to_date(self):
|
||||||
|
if not self.auth_db_exists():
|
||||||
|
return True
|
||||||
|
|
||||||
conn = self._conn()
|
conn = self._conn()
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
cursor.execute("SELECT * FROM sqlite_master "
|
cursor.execute("SELECT * FROM sqlite_master "
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user