]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Only catch NameError and TypeError when attempting to subclass an
authorFred Drake <fdrake@acm.org>
Fri, 11 May 2001 19:40:10 +0000 (19:40 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 11 May 2001 19:40:10 +0000 (19:40 +0000)
exception (for compatibility with old versions of Python).

Tools/webchecker/wsgui.py

index 1bf5f735275d2a66c27eaf127490c7d0dc6585a0..c301c6fdaf43810ff6de51cd2f19c42a0897da05 100755 (executable)
@@ -22,7 +22,7 @@ VERBOSE = 2
 try:
     class Canceled(Exception):
         "Exception used to cancel run()."
-except:
+except (NameError, TypeError):
     Canceled = __name__ + ".Canceled"