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 | f7ad13d69632c95f69898968e5410338d5bd203d (patch) | |
| tree | aabaa3a7f467fb921b8f63315dae0bdb6e5b6fc7 /setuptools | |
| parent | a328b77a91ce9b1bdc496c63a8fd869dccf0e04e (diff) | |
| download | python-setuptools-bitbucket-f7ad13d69632c95f69898968e5410338d5bd203d.tar.gz | |
Update exceptions for Python 3 compatibility
Diffstat (limited to 'setuptools')
| -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() |
