Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 491528a

Browse filesBrowse files
committed
MNT: fix rebase
1 parent 1a1f67f commit 491528a
Copy full SHA for 491528a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎lib/matplotlib/backends/qt_compat.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_compat.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import sys
1919
import signal
2020
import socket
21+
import contextlib
2122

2223
from packaging.version import parse as parse_version
2324

@@ -228,8 +229,9 @@ def _maybe_allow_interrupt(qapp):
228229
wsock, rsock = socket.socketpair()
229230
wsock.setblocking(False)
230231
old_wakeup_fd = signal.set_wakeup_fd(wsock.fileno())
231-
sn = QtCore.QSocketNotifier(rsock.fileno(),
232-
QtCore.QSocketNotifier.Read)
232+
sn = QtCore.QSocketNotifier(
233+
rsock.fileno(), _enum('QtCore.QSocketNotifier.Type').Read
234+
)
233235

234236
@sn.activated.connect
235237
def on_signal(*args):
@@ -252,7 +254,7 @@ def handle(*args):
252254
signal.set_wakeup_fd(old_wakeup_fd)
253255
signal.signal(signal.SIGINT, old_sigint_handler)
254256
if handler_args is not None:
255-
old_sigint_handler(handler_args)
257+
old_sigint_handler(*handler_args)
256258

257259
# class _maybe_allow_interrupt:
258260
#

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.