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'
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)