mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 20:34:29 +01:00
Linux systray notifications: Ignore DBUS errors when sending notifications
This commit is contained in:
parent
d2bbfc22c6
commit
153f902099
1 changed files with 10 additions and 2 deletions
|
|
@ -50,9 +50,13 @@ def __call__(self, body, summary=None, replaces_id=None, timeout=0):
|
|||
replaces_id = self.dbus.UInt32()
|
||||
event_id = ''
|
||||
timeout, body, summary = self.get_msg_parms(timeout, body, summary)
|
||||
self._notify.Notify('calibre', replaces_id, event_id, self.ICON, summary, body,
|
||||
try:
|
||||
self._notify.Notify('calibre', replaces_id, event_id, self.ICON, summary, body,
|
||||
self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'),
|
||||
timeout)
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
class FDONotifier(DBUSNotifier):
|
||||
|
||||
|
|
@ -64,9 +68,13 @@ def __call__(self, body, summary=None, replaces_id=None, timeout=0):
|
|||
if replaces_id is None:
|
||||
replaces_id = self.dbus.UInt32()
|
||||
timeout, body, summary = self.get_msg_parms(timeout, body, summary)
|
||||
self._notify.Notify('calibre', replaces_id, self.ICON, summary, body,
|
||||
try:
|
||||
self._notify.Notify('calibre', replaces_id, self.ICON, summary, body,
|
||||
self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'),
|
||||
timeout)
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
class QtNotifier(Notifier):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue