Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a213333

Browse files
committed
Only catch NameError and TypeError when attempting to subclass an
exception (for compatibility with old versions of Python).
1 parent 6f6a14f commit a213333

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tools/webchecker/wsgui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
try:
2323
class Canceled(Exception):
2424
"Exception used to cancel run()."
25-
except:
25+
except (NameError, TypeError):
2626
Canceled = __name__ + ".Canceled"
2727

2828

0 commit comments

Comments
 (0)