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 5d660a4 commit 5987bb1Copy full SHA for 5987bb1
lib/matplotlib/backends/backend_qt5.py
@@ -1034,11 +1034,12 @@ def trigger_manager_draw(manager):
1034
def mainloop():
1035
old_signal = signal.getsignal(signal.SIGINT)
1036
# allow SIGINT exceptions to close the plot window.
1037
- if old_signal:
+ old_signal_installed_from_python = old_signal is not None
1038
+ if old_signal_installed_from_python:
1039
signal.signal(signal.SIGINT, signal.SIG_DFL)
1040
try:
1041
qApp.exec_()
1042
finally:
1043
# reset the SIGINT exception handler
1044
1045
signal.signal(signal.SIGINT, old_signal)
0 commit comments