summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-09-24 04:15:40 -0400
committerChris McDonough <chrism@plope.com>2011-09-24 04:15:40 -0400
commit44ebac8a36467f2ad65cd40b906c576e4aca0330 (patch)
treed8473bef30ef81f488f4aee8a5bf0c0d8f6c32e5
parent47844249ca11e1b0b031d8c7a036ff9fa2a125f9 (diff)
downloadpyramid-44ebac8a36467f2ad65cd40b906c576e4aca0330.tar.gz
pyramid-44ebac8a36467f2ad65cd40b906c576e4aca0330.tar.bz2
pyramid-44ebac8a36467f2ad65cd40b906c576e4aca0330.zip
take advantage of as-syntax
-rw-r--r--pyramid/tweens.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyramid/tweens.py b/pyramid/tweens.py
index e40f5102f..65d7c3919 100644
--- a/pyramid/tweens.py
+++ b/pyramid/tweens.py
@@ -15,11 +15,11 @@ def excview_tween_factory(handler, registry):
attrs = request.__dict__
try:
response = handler(request)
- except Exception:
+ except Exception as exc:
# WARNING: do not assign the result of sys.exc_info() to a
# local var here, doing so will cause a leak
attrs['exc_info'] = sys.exc_info()
- exc = attrs['exception'] = attrs['exc_info'][1]
+ attrs['exception'] = exc
# clear old generated request.response, if any; it may
# have been mutated by the view, and its state is not
# sane (e.g. caching headers)