diff options
| author | Dirk Mueller <dirk@dmllr.de> | 2013-04-22 16:38:55 +0200 |
|---|---|---|
| committer | Dirk Mueller <dirk@dmllr.de> | 2013-04-22 16:38:55 +0200 |
| commit | 45feb672af7cab42898fc0f249c6fbe5a4a36e12 (patch) | |
| tree | 779b46f21812eb9cc5f9f99ea5cc166845b2aea9 /tests/v1 | |
| parent | 11c2c40d46ce5efaaa9ff388347ad82c72307bec (diff) | |
| download | python-glanceclient-45feb672af7cab42898fc0f249c6fbe5a4a36e12.tar.gz | |
Improve Python 3.x compatibility
Some mechanical translation of the deprecated
except x,y construct. Should work with Python >= 2.6
just fine
Change-Id: I394f9956b9e3e3d9f5f1e9ad50c35b13200af2a1
Diffstat (limited to 'tests/v1')
| -rw-r--r-- | tests/v1/test_images.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/v1/test_images.py b/tests/v1/test_images.py index a0f4a4e..6090584 100644 --- a/tests/v1/test_images.py +++ b/tests/v1/test_images.py @@ -333,7 +333,7 @@ class ImageManagerTest(testtools.TestCase): try: data = ''.join([b for b in data]) self.fail('data did not raise an error.') - except IOError, e: + except IOError as e: self.assertEqual(errno.EPIPE, e.errno) msg = 'was fd7c5c4fdaa97163ee4ba8842baa537a expected wrong' self.assertTrue(msg in str(e)) @@ -507,7 +507,7 @@ class ImageTest(testtools.TestCase): try: data = ''.join([b for b in image.data()]) self.fail('data did not raise an error.') - except IOError, e: + except IOError as e: self.assertEqual(errno.EPIPE, e.errno) msg = 'was fd7c5c4fdaa97163ee4ba8842baa537a expected wrong' self.assertTrue(msg in str(e)) |
