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