From ecc42067ec5e1f85ff8789c823321bd2bb7db602 Mon Sep 17 00:00:00 2001 From: thematdev Date: Wed, 22 Sep 2021 14:33:53 +0300 Subject: [PATCH] Fix 404 internal server error --- app/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 5632ca3..4908316 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -40,7 +40,8 @@ def render_page(page): def get_pandoc_page(page): path = f'{PANDOC_PATH}/{page}' if not os.path.exists(f'{path}'): - abort(404) + # TODO: Add 404 handler + return 'This page does not exist' with open(f'{path}/config.json') as f: data = json.loads(f.read()) if not os.path.exists(f'{path}/render.html') or not os.path.exists(f'{path}/render.html.lock'):