Commit 57f42bd76e270ab4fe3c0be7661658e552cff799

Authored by Goutte
1 parent b2837a08

Log the abortions.

Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
web/run.py
... ... @@ -15,7 +15,7 @@ from pprint import pprint
15 15 from csv import writer as csv_writer
16 16 from yaml import load as yaml_load
17 17 from flask import Flask
18   -from flask import redirect, url_for, send_from_directory, abort
  18 +from flask import redirect, url_for, send_from_directory, abort as abort_flask
19 19 from flask import request
20 20 from jinja2 import Environment, FileSystemLoader
21 21 from netCDF4 import Dataset
... ... @@ -122,6 +122,11 @@ tpl_global_vars = {
122 122  
123 123 # HELPERS #####################################################################
124 124  
  125 +def abort(code, message):
  126 + log.error(message)
  127 + abort_flask(code, message)
  128 +
  129 +
125 130 def render_view(view, context=None):
126 131 """
127 132 A simple helper to render [view] template with [context] vars.
... ...