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