From 04f1ccf7b2c4c16d0d1b1fc975182b66964d055e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 18 Apr 2008 00:04:10 +0200 Subject: Only init dbus threads, if it is really needed. --- portato/plugins/dbus_init.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'portato/plugins') diff --git a/portato/plugins/dbus_init.py b/portato/plugins/dbus_init.py index 851562c..653af31 100644 --- a/portato/plugins/dbus_init.py +++ b/portato/plugins/dbus_init.py @@ -1,4 +1,10 @@ -from dbus.mainloop.glib import threads_init +try: + from dbus.mainloop.glib import threads_init +except ImportError: + threads_init = None + +from portato.constants import USE_CATAPULT def dbus_init (*args): - threads_init() + if USE_CATAPULT and threads_init is not None: + threads_init() -- cgit v1.2.3