allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dill...@apache.org
Subject [allura] 02/02: shorter tracebacks on error debug pages
Date Thu, 25 Feb 2021 18:22:10 GMT
This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit e3fe8c8a881f62e00e2bc8df896cbc67eec52917
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
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))


Mime
View raw message