Convert some old-style string exceptions to class exceptions.
This commit is contained in:
parent
f28b898f13
commit
b65b006595
|
@ -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:'
|
||||||
|
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue