Fix 404 internal server error
This commit is contained in:
parent
636ac88daf
commit
ecc42067ec
@ -40,7 +40,8 @@ def render_page(page):
|
|||||||
def get_pandoc_page(page):
|
def get_pandoc_page(page):
|
||||||
path = f'{PANDOC_PATH}/{page}'
|
path = f'{PANDOC_PATH}/{page}'
|
||||||
if not os.path.exists(f'{path}'):
|
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:
|
with open(f'{path}/config.json') as f:
|
||||||
data = json.loads(f.read())
|
data = json.loads(f.read())
|
||||||
if not os.path.exists(f'{path}/render.html') or not os.path.exists(f'{path}/render.html.lock'):
|
if not os.path.exists(f'{path}/render.html') or not os.path.exists(f'{path}/render.html.lock'):
|
||||||
|
Reference in New Issue
Block a user