summaryrefslogtreecommitdiff
path: root/portato/plugins/dbus_init.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-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()