Skip to content

Commit

Permalink
MNT: fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tacaswell committed Aug 7, 2021
1 parent 3de6940 commit 5580b0d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/matplotlib/backends/qt_compat.py
Expand Up @@ -18,6 +18,7 @@
import sys
import signal
import socket
import contextlib

from packaging.version import parse as parse_version

Expand Down Expand Up @@ -228,8 +229,9 @@ def _maybe_allow_interrupt(qapp):
wsock, rsock = socket.socketpair()
wsock.setblocking(False)
old_wakeup_fd = signal.set_wakeup_fd(wsock.fileno())
sn = QtCore.QSocketNotifier(rsock.fileno(),
QtCore.QSocketNotifier.Read)
sn = QtCore.QSocketNotifier(
rsock.fileno(), _enum('QtCore.QSocketNotifier.Type').Read
)

@sn.activated.connect
def on_signal(*args):
Expand All @@ -252,7 +254,7 @@ def handle(*args):
signal.set_wakeup_fd(old_wakeup_fd)
signal.signal(signal.SIGINT, old_sigint_handler)
if handler_args is not None:
old_sigint_handler(handler_args)
old_sigint_handler(*handler_args)

# class _maybe_allow_interrupt:
#
Expand Down

0 comments on commit 5580b0d

Please sign in to comment.