Only catch NameError and TypeError when attempting to subclass an

exception (for compatibility with old versions of Python).
This commit is contained in:
Fred Drake 2001-05-11 19:40:10 +00:00
parent 6f6a14f888
commit a2133339ff
1 changed files with 1 additions and 1 deletions

View File

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