From 252fa52ee7628253dfec7636f4e55b8124efea2a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 9 Feb 2016 20:53:41 -0500 Subject: [PATCH] its sys, not traceback --- pyramid/view.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pyramid/view.py b/pyramid/view.py index 242a1b7de3..1f20622dce 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -1,5 +1,6 @@ import itertools -import traceback +import sys + import venusian from zope.interface import providedBy @@ -565,8 +566,8 @@ def invoke_exception_view( ``exc_info`` If provided, should be a 3-tuple in the form provided by - ``traceback.exc_info()``. If not provided, - ``traceback.exc_info()`` will be called to obtain the current + ``sys.exc_info()``. If not provided, + ``sys.exc_info()`` will be called to obtain the current interpreter exception information. Default: ``None``. ``request`` @@ -582,7 +583,7 @@ def invoke_exception_view( Default: ``True``. If called with no arguments, it uses the global exception information - returned by ``traceback.exc_info()`` as ``exc_info``, the request + returned by ``sys.exc_info()`` as ``exc_info``, the request object that this method is attached to as the ``request``, and ``True`` for ``secure``. @@ -595,7 +596,7 @@ def invoke_exception_view( if registry is None: registry = get_current_registry() if exc_info is None: - exc_info = traceback.exc_info() + exc_info = sys.exc_info() attrs = request.__dict__ context_iface = providedBy(exc_info[0]) view_name = attrs.get('view_name', '')