We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 591b4af + 55af19e commit ce4c99eCopy full SHA for ce4c99e
2 files changed
newsfragments/2333.bugfix.rst
@@ -0,0 +1 @@
1
+Python raises a `TypeError` if you try to (re-)install a C signal handler.
trio/_util.py
@@ -78,7 +78,7 @@ def is_main_thread():
78
try:
79
signal.signal(signal.SIGINT, signal.getsignal(signal.SIGINT))
80
return True
81
- except ValueError:
+ except (TypeError, ValueError):
82
return False
83
84
0 commit comments