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 f98a87e commit a01ca17Copy full SHA for a01ca17
lib/matplotlib/backends/backend_qt5.py
@@ -1092,11 +1092,12 @@ def trigger_manager_draw(manager):
1092
def mainloop():
1093
old_signal = signal.getsignal(signal.SIGINT)
1094
# allow SIGINT exceptions to close the plot window.
1095
- if old_signal:
+ is_python_signal_handler = old_signal is not None
1096
+ if is_python_signal_handler:
1097
signal.signal(signal.SIGINT, signal.SIG_DFL)
1098
try:
1099
qApp.exec_()
1100
finally:
1101
# reset the SIGINT exception handler
1102
1103
signal.signal(signal.SIGINT, old_signal)
0 commit comments