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