summaryrefslogtreecommitdiff
path: root/portato/plugins
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-04-18 00:04:10 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-04-18 00:04:10 +0200
commit04f1ccf7b2c4c16d0d1b1fc975182b66964d055e (patch)
tree201d33a3dcbfd631d2819db0514f89951f26169f /portato/plugins
parent34a06847d17454b33af17ef8a3b1bf8bd44817d5 (diff)
downloadportato-04f1ccf7b2c4c16d0d1b1fc975182b66964d055e.tar.gz
portato-04f1ccf7b2c4c16d0d1b1fc975182b66964d055e.tar.bz2
portato-04f1ccf7b2c4c16d0d1b1fc975182b66964d055e.zip
Only init dbus threads, if it is really needed.
Diffstat (limited to 'portato/plugins')
-rw-r--r--portato/plugins/dbus_init.py10
1 files changed, 8 insertions, 2 deletions
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()