From b65b0065954ce1a410d8309529a5239b7da2bcfd Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 18 Aug 2000 14:50:20 +0000 Subject: [PATCH] Convert some old-style string exceptions to class exceptions. --- Lib/test/test_rgbimg.py | 3 ++- Lib/test/test_unpack.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_rgbimg.py b/Lib/test/test_rgbimg.py index 38bcdf56523..1fa201d4670 100644 --- a/Lib/test/test_rgbimg.py +++ b/Lib/test/test_rgbimg.py @@ -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:' diff --git a/Lib/test/test_unpack.py b/Lib/test/test_unpack.py index 1bfd47840b9..25324c053a3 100644 --- a/Lib/test/test_unpack.py +++ b/Lib/test/test_unpack.py @@ -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):