10000
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 d10aacf commit df0e01eCopy full SHA for df0e01e
lib/matplotlib/backends/backend_qt5.py
@@ -1091,9 +1091,11 @@ def trigger_manager_draw(manager):
1091
def mainloop():
1092
old_signal = signal.getsignal(signal.SIGINT)
1093
# allow SIGINT exceptions to close the plot window.
1094
- signal.signal(signal.SIGINT, signal.SIG_DFL)
+ if old_signal:
1095
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
1096
try:
1097
qApp.exec_()
1098
finally:
1099
# reset the SIGINT exception handler
- signal.signal(signal.SIGINT, old_signal)
1100
1101
+ signal.signal(signal.SIGINT, old_signal)
0 commit comments