Skip to content

Commit

Permalink
its sys, not traceback
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Feb 10, 2016
1 parent 22bf919 commit 252fa52
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pyramid/view.py
@@ -1,5 +1,6 @@
import itertools
import traceback
import sys

import venusian

from zope.interface import providedBy
Expand Down Expand Up @@ -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``
Expand All @@ -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``.
Expand All @@ -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', '')
Expand Down

0 comments on commit 252fa52

Please sign in to comment.