Don't create DBs during schema check if they don't exist

This commit is contained in:
flan 2019-03-16 15:24:46 +01:00
parent 02fecc4e0a
commit b9a1203491
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,9 @@ class SqliteSessionManager(SimpleSessionManager):
self._ensure_schema_up_to_date()
def _ensure_schema_up_to_date(self):
if not os.path.exists(self.session_db_path):
return True
conn = self._conn()
cursor = conn.cursor()
cursor.execute("SELECT * FROM sqlite_master "

View File

@ -49,6 +49,9 @@ class SqliteUserManager(SimpleUserManager):
self._ensure_schema_up_to_date()
def _ensure_schema_up_to_date(self):
if not self.auth_db_exists():
return True
conn = self._conn()
cursor = conn.cursor()
cursor.execute("SELECT * FROM sqlite_master "