Skip to content

Instantly share code, notes, and snippets.

@infirit
Created March 22, 2016 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infirit/26048f471846199abec6 to your computer and use it in GitHub Desktop.
Save infirit/26048f471846199abec6 to your computer and use it in GitHub Desktop.
systemd bluez disabled
diff --git a/blueman/bluez/BlueZInterface.py b/blueman/bluez/BlueZInterface.py
index 366cf17..3bd7be1 100644
--- a/blueman/bluez/BlueZInterface.py
+++ b/blueman/bluez/BlueZInterface.py
@@ -12,17 +12,19 @@ class BlueZInterface(object):
@staticmethod
def get_interface_version():
- if not BlueZInterface.interface_version:
- obj = dbus.SystemBus().get_object('org.bluez', '/')
- introspection = dbus.Interface(obj, 'org.freedesktop.DBus.Introspectable').Introspect()
- if 'org.freedesktop.DBus.ObjectManager' in introspection:
- dprint('Detected BlueZ 5')
- BlueZInterface.interface_version = [5]
- elif 'org.bluez.Manager' in introspection:
- dprint('Detected BlueZ 4')
- BlueZInterface.interface_version = [4]
- else:
- raise Exception('Could not find any compatible version of BlueZ')
+ BluezInterface.interface_version = [5]
+ dprint("Forced BlueZ 5")
+ #if not BlueZInterface.interface_version:
+ # obj = dbus.SystemBus().get_object('org.bluez', '/')
+ # introspection = dbus.Interface(obj, 'org.freedesktop.DBus.Introspectable').Introspect()
+ # if 'org.freedesktop.DBus.ObjectManager' in introspection:
+ # dprint('Detected BlueZ 5')
+ # BlueZInterface.interface_version = [5]
+ # elif 'org.bluez.Manager' in introspection:
+ # dprint('Detected BlueZ 4')
+ # BlueZInterface.interface_version = [4]
+ # else:
+ # raise Exception('Could not find any compatible version of BlueZ')
return BlueZInterface.interface_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment