home · contact · privacy
Simplify code with namedtuples and dataclasses.
[plomtask] / run.py
diff --git a/run.py b/run.py
index 33346375ea8ad03a19b43ce8f26e0c3e8498bbbd..e1bbe5dafa4a43664f3b6839fe2659dc80ff0f8b 100755 (executable)
--- 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()