From: Christian Heller Date: Tue, 19 Mar 2024 23:48:16 +0000 (+0100) Subject: Rename DB path environment variable to something more unique. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/ledger?a=commitdiff_plain;h=1cddadfe3426a5845008e38f430b4bd371986b51;p=plomtask Rename DB path environment variable to something more unique. --- diff --git a/run.py b/run.py index ef6aeab..3334637 100755 --- a/run.py +++ b/run.py @@ -6,7 +6,7 @@ from plomtask.misc import HandledException from plomtask.http import TaskHandler, TaskServer from plomtask.db import DatabaseFile -PATH_DB = environ.get('PATH_DB') +PLOMTASK_DB_PATH = environ.get('PLOMTASK_DB_PATH') HTTP_PORT = 8082 TEMPLATES_DIR = 'templates' DB_CREATION_ASK = 'Database file not found. Create? Y/n\n' @@ -14,9 +14,9 @@ DB_CREATION_ASK = 'Database file not found. Create? Y/n\n' if __name__ == '__main__': try: - if not PATH_DB: - raise HandledException('PATH_DB not set.') - db_file = DatabaseFile(PATH_DB) + if not PLOMTASK_DB_PATH: + raise HandledException('PLOMTASK_DB_PATH not set.') + db_file = DatabaseFile(PLOMTASK_DB_PATH) if not db_file.exists: legal_yesses = {'y', 'yes', 'yes.', 'yes!'} reply = input(DB_CREATION_ASK)