Convert except X, T to except X as T

This commit is contained in:
JoeLametta
2018-05-02 08:10:00 +00:00
parent 5f75d41c7b
commit 4280dbfafc
12 changed files with 31 additions and 31 deletions

View File

@@ -49,9 +49,9 @@ class TestCase(unittest.TestCase):
def failUnlessRaises(self, exception, f, *args, **kwargs):
try:
result = f(*args, **kwargs)
except exception, inst:
except exception as inst:
return inst
except exception, e:
except exception as e:
raise Exception('%s raised instead of %s:\n %s' %
(sys.exec_info()[0], exception.__name__, str(e))
)