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 71a54ac + 48ddfbc commit d162b6dCopy full SHA for d162b6d
1 file changed
lib/matplotlib/backends/backend_qt5.py
@@ -1034,9 +1034,11 @@ 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
- signal.signal(signal.SIGINT, signal.SIG_DFL)
+ if old_signal:
1038
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
1039
try:
1040
qApp.exec_()
1041
finally:
1042
# reset the SIGINT exception handler
- signal.signal(signal.SIGINT, old_signal)
1043
1044
+ signal.signal(signal.SIGINT, old_signal)
0 commit comments