From 57f42bd76e270ab4fe3c0be7661658e552cff799 Mon Sep 17 00:00:00 2001 From: Goutte Date: Thu, 20 Jul 2017 09:50:43 +0200 Subject: [PATCH] Log the abortions. --- web/run.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/run.py b/web/run.py index 0ffa7e8..8737e34 100755 --- a/web/run.py +++ b/web/run.py @@ -15,7 +15,7 @@ from pprint import pprint from csv import writer as csv_writer from yaml import load as yaml_load from flask import Flask -from flask import redirect, url_for, send_from_directory, abort +from flask import redirect, url_for, send_from_directory, abort as abort_flask from flask import request from jinja2 import Environment, FileSystemLoader from netCDF4 import Dataset @@ -122,6 +122,11 @@ tpl_global_vars = { # HELPERS ##################################################################### +def abort(code, message): + log.error(message) + abort_flask(code, message) + + def render_view(view, context=None): """ A simple helper to render [view] template with [context] vars. -- libgit2 0.21.2