mirror of
https://github.com/python/cpython.git
synced 2025-11-01 22:21:35 +00:00
Convert some old-style string exceptions to class exceptions.
This commit is contained in:
parent
f28b898f13
commit
b65b006595
2 changed files with 4 additions and 2 deletions
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
from test_support import verbose, unlink, findfile
|
||||
|
||||
error = 'test_rgbimg.error'
|
||||
class error(Exception):
|
||||
pass
|
||||
|
||||
print 'RGBimg test suite:'
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,8 @@ def __getitem__(self, i):
|
|||
|
||||
# unpacking a sequence where the test for too long raises a different
|
||||
# kind of error
|
||||
BozoError = 'BozoError'
|
||||
class BozoError(Exception):
|
||||
pass
|
||||
|
||||
class BadSeq:
|
||||
def __getitem__(self, i):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue