diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 11:35:16 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-04 11:35:16 -0500 |
| commit | 9d6a6e5927ae0e67164383e419f3145fc154467e (patch) | |
| tree | 8872d8b6de4c8706a5178dcb3dab2c9803216e59 /setuptools/tests/test_sdist.py | |
| parent | a849ee957f3ba12945278f88e473eb3612faf4b9 (diff) | |
| download | python-setuptools-git-9d6a6e5927ae0e67164383e419f3145fc154467e.tar.gz | |
Use except/as, now supported by Python 2.6
Diffstat (limited to 'setuptools/tests/test_sdist.py')
| -rw-r--r-- | setuptools/tests/test_sdist.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 943a5dee..68f83ca7 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -174,8 +174,7 @@ class TestSdistTest: # The manifest should be UTF-8 encoded try: u_contents = contents.decode('UTF-8') - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The manifest should contain the UTF-8 filename @@ -217,8 +216,7 @@ class TestSdistTest: # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The manifest should contain the UTF-8 filename @@ -258,8 +256,7 @@ class TestSdistTest: # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The Latin-1 filename should have been skipped @@ -328,8 +325,7 @@ class TestSdistTest: with quiet(): try: cmd.read_manifest() - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The Latin-1 filename should have been skipped |
