Convert some old-style string exceptions to class exceptions.

This commit is contained in:
Fred Drake 2000-08-18 14:50:20 +00:00
parent f28b898f13
commit b65b006595
2 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,8 @@ import rgbimg, os, uu
from test_support import verbose, unlink, findfile from test_support import verbose, unlink, findfile
error = 'test_rgbimg.error' class error(Exception):
pass
print 'RGBimg test suite:' print 'RGBimg test suite:'

View File

@ -100,7 +100,8 @@ except ValueError:
# unpacking a sequence where the test for too long raises a different # unpacking a sequence where the test for too long raises a different
# kind of error # kind of error
BozoError = 'BozoError' class BozoError(Exception):
pass
class BadSeq: class BadSeq:
def __getitem__(self, i): def __getitem__(self, i):