diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-18 00:04:10 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-18 00:04:10 +0200 |
commit | 04f1ccf7b2c4c16d0d1b1fc975182b66964d055e (patch) | |
tree | 201d33a3dcbfd631d2819db0514f89951f26169f /portato/plugins | |
parent | 34a06847d17454b33af17ef8a3b1bf8bd44817d5 (diff) | |
download | portato-04f1ccf7b2c4c16d0d1b1fc975182b66964d055e.tar.gz portato-04f1ccf7b2c4c16d0d1b1fc975182b66964d055e.tar.bz2 portato-04f1ccf7b2c4c16d0d1b1fc975182b66964d055e.zip |
Only init dbus threads, if it is really needed.
Diffstat (limited to '')
-rw-r--r-- | portato/plugins/dbus_init.py | 10 |
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() |