8000
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.
1 parent 5b1be99 commit 2964320Copy full SHA for 2964320
lib/matplotlib/backends/backend_qt5.py
@@ -1043,11 +1043,12 @@ def trigger_manager_draw(manager):
1043
def mainloop():
1044
old_signal = signal.getsignal(signal.SIGINT)
1045
# allow SIGINT exceptions to close the plot window.
1046
- if old_signal:
+ is_python_signal_handler = old_signal is not None
1047
+ if is_python_signal_handler:
1048
signal.signal(signal.SIGINT, signal.SIG_DFL)
1049
try:
1050
qApp.exec_()
1051
finally:
1052
# reset the SIGINT exception handler
1053
1054
signal.signal(signal.SIGINT, old_signal)
0 commit comments