diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-17 08:23:32 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-17 08:23:32 -0500 |
commit | b827baba9c89188f92579fe943da4f0dadde9fda (patch) | |
tree | 88e0ff74e0b1fe14c6880db74170fbdf58cc4a68 /setuptools/tests/test_sdist.py | |
parent | 67f9020e66d82dbf0b0ada5772a960ecc054d850 (diff) | |
download | external_python_setuptools-b827baba9c89188f92579fe943da4f0dadde9fda.tar.gz external_python_setuptools-b827baba9c89188f92579fe943da4f0dadde9fda.tar.bz2 external_python_setuptools-b827baba9c89188f92579fe943da4f0dadde9fda.zip |
Update exceptions for Python 3 compatibility
--HG--
branch : distribute
extra : rebase_source : 354795c0a0b8a864583f2549ce869e719be265d2
Diffstat (limited to 'setuptools/tests/test_sdist.py')
-rw-r--r-- | setuptools/tests/test_sdist.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f48decf6..1682989a 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -147,7 +147,8 @@ class TestSdistTest(unittest.TestCase): # The manifest should be UTF-8 encoded try: u_contents = contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -188,7 +189,8 @@ class TestSdistTest(unittest.TestCase): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -226,7 +228,8 @@ class TestSdistTest(unittest.TestCase): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The Latin-1 filename should have been skipped @@ -305,7 +308,8 @@ class TestSdistTest(unittest.TestCase): try: try: cmd.read_manifest() - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) finally: unquiet() |