changeset c5b2c627725b in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=c5b2c627725b
description: check session and system bus before supposing dbus is working. 
Fixes #5628

diffstat:

 src/common/dbus_support.py |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 990b71a444fc -r c5b2c627725b src/common/dbus_support.py
--- a/src/common/dbus_support.py        Wed Feb 24 21:32:35 2010 +0100
+++ b/src/common/dbus_support.py        Thu Feb 25 15:33:27 2010 +0100
@@ -42,6 +42,7 @@
 else:
        try:
                # test if dbus-x11 is installed
+               bus = dbus.SystemBus()
                bus = dbus.SessionBus()
                supported = True # does user have D-Bus bindings?
        except dbus.DBusException:
@@ -49,6 +50,12 @@
                if not os.name == 'nt': # only say that to non Windows users
                        print _('D-Bus does not run correctly on this machine')
                        print _('D-Bus capabilities of Gajim cannot be used')
+       except exceptions.SystemBusNotPresent:
+               print _('D-Bus does not run correctly on this machine: system 
bus not '
+                       'present')
+       except exceptions.SessionBusNotPresent:
+               print _('D-Bus does not run correctly on this machine: session 
bus not '
+                       'present')
 
 class SystemBus:
        '''A Singleton for the DBus SystemBus'''
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to