From fc5c33c918e4babf2ef3c5ce61b0f18627f8e4f7 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 22 Mar 2017 22:54:44 -0700 Subject: [PATCH] Fix traceback not being shown on general exceptions --- etiquette_site.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etiquette_site.py b/etiquette_site.py index 3de03af..7a58171 100644 --- a/etiquette_site.py +++ b/etiquette_site.py @@ -4,6 +4,7 @@ import json import mimetypes import os import random +import traceback import urllib.parse import warnings import zipstream @@ -91,10 +92,11 @@ def P_wrapper(function): flask.abort(response) except Exception as e: - if response_type == 'html': - flask.abort(500) - else: - flask.abort(jsonify.make_response({}, status=500)) + traceback.print_exc() + if response_type == 'html': + flask.abort(500) + else: + flask.abort(jsonify.make_response({}, status=500)) return P_wrapped