This is an automated email from the ASF dual-hosted git repository. brondsem pushed a commit to branch db/nicer_debug_errors in repository https://gitbox.apache.org/repos/asf/allura.git
commit a5c5ad36f317f2eb4ac85965506efb14383f003b Author: Dave Brondsema <[email protected]> AuthorDate: Wed Feb 10 15:06:39 2021 -0500 shorter tracebacks on error debug pages --- Allura/allura/lib/patches.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Allura/allura/lib/patches.py b/Allura/allura/lib/patches.py index 5eefc39..7f77ba8 100644 --- a/Allura/allura/lib/patches.py +++ b/Allura/allura/lib/patches.py @@ -74,6 +74,7 @@ def apply(): @decorator def without_trailing_slash(func, *args, **kwargs): '''Monkey-patched to use 301 redirects for SEO, and handle query strings''' + __traceback_hide__ = 'before_and_this' # for paste/werkzeug shorter traces response_type = getattr(request, 'response_type', None) if (request.method == 'GET' and request.path.endswith('/') and not response_type): location = request.path_url[:-1] @@ -86,6 +87,7 @@ def apply(): @decorator def with_trailing_slash(func, *args, **kwargs): '''Monkey-patched to use 301 redirects for SEO, and handle query strings''' + __traceback_hide__ = 'before_and_this' # for paste/werkzeug shorter traces response_type = getattr(request, 'response_type', None) if (request.method == 'GET' and not request.path.endswith('/') and not response_type): location = request.path_url + '/' @@ -113,6 +115,7 @@ def newrelic(): tg.controllers.decoratedcontroller.DecoratedController) def _call(self, controller, *args, **kwargs): '''Set NewRelic transaction name to actual controller name''' + __traceback_hide__ = 'before_and_this' # for paste/werkzeug shorter traces import newrelic.agent newrelic.agent.set_transaction_name( newrelic.agent.callable_name(controller))
