]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Convert some old-style string exceptions to class exceptions.
authorFred Drake <fdrake@acm.org>
Fri, 18 Aug 2000 14:50:20 +0000 (14:50 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 18 Aug 2000 14:50:20 +0000 (14:50 +0000)
Lib/test/test_rgbimg.py
Lib/test/test_unpack.py

index 38bcdf565230b87b2e78593852209fe8f8ec0c50..1fa201d4670be3c996d67cd3c9f58f55f601a29c 100644 (file)
@@ -4,7 +4,8 @@ import rgbimg, os, uu
 
 from test_support import verbose, unlink, findfile
 
-error = 'test_rgbimg.error'
+class error(Exception):
+        pass
 
 print 'RGBimg test suite:'
 
index 1bfd47840b9101ae4f1423c403510dcf46e407dc..25324c053a3fb87d0663114baaba7c27728722b8 100644 (file)
@@ -100,7 +100,8 @@ except ValueError:
 
 # 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):