mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Only catch NameError and TypeError when attempting to subclass an
exception (for compatibility with old versions of Python).
This commit is contained in:
@@ -22,7 +22,7 @@ VERBOSE = 2
|
||||
try:
|
||||
class Canceled(Exception):
|
||||
"Exception used to cancel run()."
|
||||
except:
|
||||
except (NameError, TypeError):
|
||||
Canceled = __name__ + ".Canceled"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user