Notifications: Catch all DBus errors

This commit is contained in:
Philipp Hörist 2019-02-16 20:08:00 +01:00
parent 7cd781e921
commit 0573d42d29
1 changed files with 2 additions and 6 deletions

View File

@ -61,12 +61,8 @@ class Notification:
try:
proxy = Gio.DBusProxy.new_finish(res)
self._daemon_capabilities = proxy.GetCapabilities()
except GLib.Error as error:
if error.domain == 'g-dbus-error-quark':
log.info('Notifications D-Bus connection failed: %s',
error.message)
else:
raise
except GLib.Error:
log.exception('Notifications D-Bus connection failed')
else:
log.debug('Notifications D-Bus connected')