From 32fbe2729c2cecc3752e1ac8e2a7234dfd4d1ad9 Mon Sep 17 00:00:00 2001
From: Nikos Kouremenos <kourem@gmail.com>
Date: Mon, 12 Dec 2005 14:05:01 +0000
Subject: [PATCH] clean up logic; prevent a tb in Windoz

---
 src/dbus_support.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/dbus_support.py b/src/dbus_support.py
index 6a3f529d8b..688b1e0968 100644
--- a/src/dbus_support.py
+++ b/src/dbus_support.py
@@ -32,22 +32,22 @@
 try:
 	import dbus
 	version = getattr(dbus, 'version', (0, 20, 0))
+	supported = True
 except ImportError:
 	version = (0, 0, 0)
-	
-if version >= (0, 41, 0):
-	import dbus.service
-	import dbus.glib # cause dbus 0.35+ doesn't return signal replies without it
-
-supported = True
-if 'dbus' not in globals() and not os.name == 'nt':
-	print _('D-Bus python bindings are missing in this computer')
-	print _('D-Bus capabilities of Gajim cannot be used')
 	supported = False
+	if not os.name == 'nt': # only say that to non Windows users
+		print _('D-Bus python bindings are missing in this computer')
+		print _('D-Bus capabilities of Gajim cannot be used')
+	
 # dbus 0.23 leads to segfault with threads_init()
 if sys.version[:4] >= '2.4' and version[1] < 30:
 	supported = False
 
+if version >= (0, 41, 0):
+	import dbus.service
+	import dbus.glib # cause dbus 0.35+ doesn't return signal replies without it
+
 class SessionBus:
 	'''A Singleton for the DBus SessionBus'''
 	def __init__(self):
-- 
GitLab