diff options
| -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() |
