File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,8 @@ def _on_sigquit(signum, frame):
337
337
while not run_loop_task .done ():
338
338
try :
339
339
self .__loop_from_run_thread .run_until_complete (run_loop_task )
340
+ except KeyboardInterrupt :
341
+ pass
340
342
except asyncio .CancelledError :
341
343
_logger .error ('asyncio run loop was canceled' )
342
344
finally :
Original file line number Diff line number Diff line change @@ -101,9 +101,6 @@ def install_signal_handlers():
101
101
If you register signal handlers before calling this function, then your
102
102
signal handler will automatically be called by the signal handlers in this
103
103
thread.
104
- If your handler for SIGINT raises KeyboardInterrupt, and a custom handler
105
- for SIGINT has been set with on_sigint, then that exception will be
106
- suppressed.
107
104
"""
108
105
global __signal_handlers_installed_lock , __signal_handlers_installed
109
106
with __signal_handlers_installed_lock :
@@ -120,12 +117,7 @@ def __on_sigint(signum, frame):
120
117
if callable (__custom_sigint_handler ):
121
118
__custom_sigint_handler (signum , frame )
122
119
if callable (__original_sigint_handler ):
123
- try :
124
- __original_sigint_handler (signum , frame )
125
- except KeyboardInterrupt :
126
- if __custom_sigint_handler is None :
127
- # Suppress KeyboardInterrupt unless there is no custom handler.
128
- raise
120
+ __original_sigint_handler (signum , frame )
129
121
130
122
if platform .system () != 'Windows' :
131
123
# Windows does not support SIGQUIT
You can’t perform that action at this time.
0 commit comments