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 6353165 + 444838e commit 1ef5768Copy full SHA for 1ef5768
1 file changed
lib/matplotlib/backends/backend_qt5.py
@@ -1042,9 +1042,11 @@ def trigger_manager_draw(manager):
1042
def mainloop():
1043
old_signal = signal.getsignal(signal.SIGINT)
1044
# allow SIGINT exceptions to close the plot window.
1045
- signal.signal(signal.SIGINT, signal.SIG_DFL)
+ if old_signal:
1046
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
1047
try:
1048
qApp.exec_()
1049
finally:
1050
# reset the SIGINT exception handler
- signal.signal(signal.SIGINT, old_signal)
1051
1052
+ signal.signal(signal.SIGINT, old_signal)
0 commit comments