From 95c67fc575648c25277d9428799e860e3b5fcccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 15 Jan 2024 10:24:49 +0200 Subject: [PATCH] settings: $STATE_DIRECTORY is not useful Packages on "real servers" will set it in package params. --- app/e11sync/settings.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/e11sync/settings.py b/app/e11sync/settings.py index adf6143..257421d 100644 --- a/app/e11sync/settings.py +++ b/app/e11sync/settings.py @@ -1,5 +1,5 @@ from pathlib import Path -from os import environ, path +from os import environ # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -11,10 +11,7 @@ _GEOIP_PATH = environ.get('GEOIP_PATH') if db := environ.get('E11SYNC_DATABASE_PATH'): _DATABASE_PATH = db else: - if statedir := environ.get('STATE_DIRECTORY'): - _DATABASE_PATH = path.join(statedir, 'db.sqlite3') - else: - _DATABASE_PATH = BASE_DIR / 'db.sqlite3' + _DATABASE_PATH = BASE_DIR / 'db.sqlite3' if secret_path := environ.get("E11SYNC_SECRET_KEY_PATH"): with open(secret_path) as f: