mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
Update config.py
This commit is contained in:
parent
f9c5808940
commit
0c6d4c82c3
1 changed files with 2 additions and 1 deletions
|
@ -358,7 +358,7 @@ DYNAMIC_CONFIG_SCHEMA: ConfigDefaultDict = {
|
|||
'DJANGO_VERSION': {'default': lambda c: '{}.{}.{} {} ({})'.format(*django.VERSION)},
|
||||
|
||||
'SQLITE_BINARY': {'default': lambda c: inspect.getfile(sqlite3)},
|
||||
'SQLITE_VERSION': {'default': lambda c: sqlite3.version_info},
|
||||
'SQLITE_VERSION': {'default': lambda c: sqlite3.version},
|
||||
'SQLITE_JOURNAL_MODE': {'default': lambda c: None}, # set at runtime below
|
||||
'SQLITE_OPTIONS': {'default': lambda c: []}, # set at runtime below
|
||||
|
||||
|
@ -1005,6 +1005,7 @@ if not CONFIG['CHECK_SSL_VALIDITY']:
|
|||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
# get SQLite database version, compile options, and runtime options
|
||||
# TODO: move this somewhere better, e.g. setup_django
|
||||
cursor = sqlite3.connect(':memory:').cursor()
|
||||
#DYNAMIC_CONFIG_SCHEMA['SQLITE_VERSION'] = lambda c: cursor.execute("SELECT sqlite_version();").fetchone()[0]
|
||||
DYNAMIC_CONFIG_SCHEMA['SQLITE_JOURNAL_MODE'] = lambda c: cursor.execute('PRAGMA journal_mode;').fetchone()[0]
|
||||
|
|
Loading…
Reference in a new issue