diff options
author | Armin Rigo <arigo@tunes.org> | 2013-07-19 20:51:47 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2013-07-19 20:51:47 +0200 |
commit | 9d36a5b46e8c005ac4cdf54cbfd8d15133bf170c (patch) | |
tree | b5a37a049469270ba6088fda7447212748edc568 /lib_pypy/greenlet.py | |
parent | Fix the second test. (diff) | |
download | pypy-9d36a5b46e8c005ac4cdf54cbfd8d15133bf170c.tar.gz pypy-9d36a5b46e8c005ac4cdf54cbfd8d15133bf170c.tar.bz2 pypy-9d36a5b46e8c005ac4cdf54cbfd8d15133bf170c.zip |
Test for the "except:" path. Tests that the exception class is only
instantiated once, and fix.
Diffstat (limited to 'lib_pypy/greenlet.py')
-rw-r--r-- | lib_pypy/greenlet.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib_pypy/greenlet.py b/lib_pypy/greenlet.py index 36d49a1043..f3efb7a25c 100644 --- a/lib_pypy/greenlet.py +++ b/lib_pypy/greenlet.py @@ -1,3 +1,4 @@ +import sys import _continuation __version__ = "0.4.0" @@ -84,8 +85,8 @@ class greenlet(_continulet): methodname = 'switch' baseargs = (((e,), {}),) except: - pass - convert_greenletexit = False + baseargs = sys.exc_info()[:2] + baseargs[2:] + convert_greenletexit = False # try: unbound_method = getattr(_continulet, methodname) |