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.
1 parent a05a2ac commit 8bf2b15Copy full SHA for 8bf2b15
1 file changed
lib/matplotlib/backends/qt_compat.py
@@ -228,8 +228,14 @@ def _maybe_allow_interrupt(qapp):
228
rsock.fileno(), _enum('QtCore.QSocketNotifier.Type').Read
229
)
230
231
+ rsock.setblocking(False)
232
# Clear the socket to re-arm the notifier.
- sn.activated.connect(lambda *args: rsock.recv(1))
233
+ @sn.activated.connect
234
+ def _may_clear_sock(*args):
235
+ try:
236
+ rsock.recv(1)
237
+ except BlockingIOError:
238
+ pass
239
240
def handle(*args):
241
nonlocal handler_args
0 commit comments