changeset d4314c43a512 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=d4314c43a512
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 befc5cb2a1f1 -r d4314c43a512 src/common/dbus_support.py
--- a/src/common/dbus_support.py        Thu Feb 25 13:10:35 2010 +0200
+++ 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:
     """
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to