From b6579534786ed35d016bc4c1b12b92981519d6d6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Jan 2021 03:15:39 +0530 Subject: [PATCH] Dont rely on the arguments of the activated signal as they are unknown in PyQt6 --- src/calibre/gui2/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index ec5ca7d6fe..a53a48673b 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -1203,10 +1203,10 @@ class Application(QApplication): def setup_unix_signals(self): setup_unix_signals(self) - def signal_received(self, read_fd): + def signal_received(self): try: - os.read(read_fd, 1024) - except EnvironmentError: + os.read(self.signal_notifier.socket(), 1024) + except OSError: return self.shutdown_signal_received.emit()