From 48fa632304e44d7dd94da17c3c31dbf757897147 Mon Sep 17 00:00:00 2001 From: Goutte Date: Thu, 6 Sep 2018 13:05:21 +0200 Subject: [PATCH] Try to fix the heisenbug with CDF and spacepy. --- web/run.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/run.py b/web/run.py index 8b00505..edf8c4e 100755 --- a/web/run.py +++ b/web/run.py @@ -137,7 +137,7 @@ PARAMETERS = { } -# ENV ######################################################################### +# SETUP ENVIRONMENT ########################################################### environ['SPACEPY'] = CACHE_DIR environ['CDF_LIB'] = CDF_LIB @@ -153,6 +153,13 @@ else: log.info("Starting Flask app...") +def handle_error(e): + log.error(e) + return str(e) # wish we could use the default error renderer here + +app.register_error_handler(Exception, handle_error) + + # SETUP JINJA2 TEMPLATE ENGINE ################################################ def static_global(filename): -- libgit2 0.21.2