Commit b827baba authored by Jason R. Coombs's avatar Jason R. Coombs

Update exceptions for Python 3 compatibility

--HG--
branch : distribute
extra : rebase_source : 354795c0a0b8a864583f2549ce869e719be265d2
parent 67f9020e
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment