fix DBus TB
This commit is contained in:
parent
0fe2a7b78c
commit
8cc90d1d73
|
@ -70,7 +70,7 @@ class SessionBus:
|
|||
if self.session_bus is None:
|
||||
try:
|
||||
self.session_bus = dbus.SessionBus()
|
||||
except dbus.DBusException:
|
||||
except dbus.dbus_bindings.DBusException:
|
||||
self.session_bus = None
|
||||
return False
|
||||
if self.session_bus is None:
|
||||
|
@ -106,7 +106,7 @@ def get_interface(interface, path):
|
|||
except Exception, e:
|
||||
print >> sys.stderr, e
|
||||
return None
|
||||
except dbus.DBusException, e:
|
||||
except dbus.dbus_bindings.DBusException, e:
|
||||
# This exception could give useful info about why notification breaks
|
||||
print >> sys.stderr, e
|
||||
return None
|
||||
|
|
|
@ -55,7 +55,7 @@ def notify(event_type, jid, account, msg_type = '', file_props = None):
|
|||
try:
|
||||
DesktopNotification(event_type, jid, account, msg_type, file_props)
|
||||
return
|
||||
except dbus.DBusException, e:
|
||||
except dbus.dbus_bindings.DBusException, e:
|
||||
# Connection to DBus failed, try popup
|
||||
print >> sys.stderr, e
|
||||
except TypeError, e:
|
||||
|
@ -188,7 +188,7 @@ class DesktopNotification:
|
|||
|
||||
self.notif = dbus_support.get_notifications_interface()
|
||||
if self.notif is None:
|
||||
raise dbus.DBusException()
|
||||
raise dbus.dbus_bindings.DBusException()
|
||||
self.id = self.notif.Notify(dbus.String(_('Gajim')),
|
||||
dbus.String(path), dbus.UInt32(0), ntype, dbus.Byte(0),
|
||||
dbus.String(event_type), dbus.String(txt),
|
||||
|
|
Loading…
Reference in New Issue