Thanks to visit codestin.com Credit goes to github.com
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.
2 parents 5b1be99 + 2964320 commit 0c43f2aCopy full SHA for 0c43f2a
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