diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-01-02 10:26:04 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-01-02 10:26:04 -0600 |
commit | c892030caef631cb580286779d4ebe2c67e7886d (patch) | |
tree | a55d7fcc13cc92bcb603908df688cdbc55837d06 | |
parent | 1ba12e99db60c3d5703f72b20e4d3513b375414a (diff) | |
download | six-c892030caef631cb580286779d4ebe2c67e7886d.tar.gz |
fix raise_from on py3.2
-rw-r--r-- | six.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -677,7 +677,13 @@ else: """) -if sys.version_info > (3, 2): +if sys.version_info[:2] == (3, 2): + exec_("""def raise_from(value, from_value): + if from_value is None: + raise value + raise value from from_value +""") +elif sys.version_info[:2] > (3, 2): exec_("""def raise_from(value, from_value): raise value from from_value """) |