X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=run.py;h=e1bbe5dafa4a43664f3b6839fe2659dc80ff0f8b;hb=951d8ad55c0d54286f9c986257a67dfa9710fcf2;hp=33346375ea8ad03a19b43ce8f26e0c3e8498bbbd;hpb=1cddadfe3426a5845008e38f430b4bd371986b51;p=plomtask diff --git a/run.py b/run.py index 3334637..e1bbe5d 100755 --- a/run.py +++ b/run.py @@ -2,13 +2,12 @@ """Call this to start the application.""" from sys import exit as sys_exit from os import environ -from plomtask.misc import HandledException +from plomtask.exceptions import HandledException from plomtask.http import TaskHandler, TaskServer from plomtask.db import DatabaseFile 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' @@ -25,8 +24,7 @@ if __name__ == '__main__': else: print('Not recognizing reply as "yes".') raise HandledException('Cannot run without database.') - server = TaskServer(TEMPLATES_DIR, db_file, - ('localhost', HTTP_PORT), TaskHandler) + server = TaskServer(db_file, ('localhost', HTTP_PORT), TaskHandler) print(f'running at port {HTTP_PORT}') try: server.serve_forever()