mirror of https://github.com/python/cpython.git
Only catch NameError and TypeError when attempting to subclass an
exception (for compatibility with old versions of Python).
This commit is contained in:
parent
6f6a14f888
commit
a2133339ff
|
@ -22,7 +22,7 @@
|
||||||
try:
|
try:
|
||||||
class Canceled(Exception):
|
class Canceled(Exception):
|
||||||
"Exception used to cancel run()."
|
"Exception used to cancel run()."
|
||||||
except:
|
except (NameError, TypeError):
|
||||||
Canceled = __name__ + ".Canceled"
|
Canceled = __name__ + ".Canceled"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue