Dont rely on the arguments of the activated signal as they are unknown in PyQt6

This commit is contained in:
Kovid Goyal 2021-01-14 03:15:39 +05:30
parent e4cce88002
commit b657953478
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1203,10 +1203,10 @@ class Application(QApplication):
def setup_unix_signals(self): def setup_unix_signals(self):
setup_unix_signals(self) setup_unix_signals(self)
def signal_received(self, read_fd): def signal_received(self):
try: try:
os.read(read_fd, 1024) os.read(self.signal_notifier.socket(), 1024)
except EnvironmentError: except OSError:
return return
self.shutdown_signal_received.emit() self.shutdown_signal_received.emit()