diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-05-02 15:52:05 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-05-02 15:52:05 +0200 |
commit | 3a09126e2ea8280a0b0635be246eafa27377f5cc (patch) | |
tree | 6cda3f2d533cd6dec9ffe52173aa3414bb022745 | |
parent | 3eeb0954482b7eb9b9f7029cb547fa8d43fe31a0 (diff) | |
download | qutebrowser-3a09126e2ea8280a0b0635be246eafa27377f5cc.tar.gz qutebrowser-3a09126e2ea8280a0b0635be246eafa27377f5cc.zip |
notifications: Make invalid IDs non-fatal
Also only check for them for DBus notifications. Fixes #7153.
-rw-r--r-- | qutebrowser/browser/webengine/notification.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/browser/webengine/notification.py b/qutebrowser/browser/webengine/notification.py index 57b593ce1..f3166013e 100644 --- a/qutebrowser/browser/webengine/notification.py +++ b/qutebrowser/browser/webengine/notification.py @@ -278,9 +278,6 @@ class NotificationBridgePresenter(QObject): log.misc.debug("Adapter vanished, bailing out") # type: ignore[unreachable] return - if notification_id <= 0: - raise Error(f"Got invalid notification id {notification_id}") - if replaces_id is None: if notification_id in self._active_notifications: raise Error(f"Got duplicate id {notification_id}") @@ -1006,6 +1003,9 @@ class DBusNotificationAdapter(AbstractNotificationAdapter): else: log.misc.error(msg) + if notification_id <= 0: + self.error.emit(f"Got invalid notification id {notification_id}") + return notification_id def _convert_image(self, qimage: QImage) -> Optional[QDBusArgument]: |