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 5d660a4 commit cd5d0b6Copy full SHA for cd5d0b6
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:
+ is_python_signal_handler = old_signal is not None
1038
+ if is_python_signal_handler:
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