# Buggy code
def get(self, name):
    prop = self._dbus_proxy.get_cached_property(name)

    if prop is not None:
        return prop.unpack()
    elif not prop and name in self.__fallback:
        return self.__fallback[name]
    else:
        raise BluezDBusException("No such property '%s'" % name)


# Traceback (TypeError)
_________
_on_dbus_name_vanished (/usr/bin/blueman-applet:84)
org.bluez
_________
update_menuitems (/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py:116)
warning: Adapter is None
_________
on_unregistered (/usr/lib64/python3.5/site-packages/blueman/bluez/obex/AgentManager.py:28)
/org/bluez/obex/agent/blueman

_________
_on_object_added (/usr/lib64/python3.5/site-packages/blueman/bluez/Manager.py:45)
/org/bluez/hci0
_________
on_adapter_added (/usr/bin/blueman-applet:99)
Adapter added  /org/bluez/hci0
Traceback (most recent call last):
File "/usr/bin/blueman-applet", line 107, in on_adapter_added
wait_for_adapter(adapter, on_activate)
File "/usr/lib64/python3.5/site-packages/blueman/Functions.py", line 129, in wait_for_adapter
if props["Address"] != "00:00:00:00:00:00":
TypeError: 'NoneType' object is not subscriptable
_________
_on_object_added (/usr/lib64/python3.5/site-packages/blueman/bluez/Manager.py:45)
/org/bluez/hci0/dev_00_1F_20_3A_89_89
_________
on_device_created (/usr/bin/blueman-applet:113)
Device created  /org/bluez/hci0/dev_00_1F_20_3A_89_89
_________
_on_object_added (/usr/lib64/python3.5/site-packages/blueman/bluez/Manager.py:45)
/org/bluez/hci0/dev_6C_83_36_B9_C6_D6
_________
on_device_created (/usr/bin/blueman-applet:113)
Device created  /org/bluez/hci0/dev_6C_83_36_B9_C6_D6
_________
_on_object_added (/usr/lib64/python3.5/site-packages/blueman/bluez/Manager.py:45)
/org/bluez/hci0/dev_00_07_61_48_7A_2C
_________
on_device_created (/usr/bin/blueman-applet:113)
Device created  /org/bluez/hci0/dev_00_07_61_48_7A_2C
_________
_on_object_added (/usr/lib64/python3.5/site-packages/blueman/bluez/Manager.py:45)
/org/bluez/hci0/dev_40_F4_07_CB_E4_D7
_________
on_device_created (/usr/bin/blueman-applet:113)
Device created  /org/bluez/hci0/dev_40_F4_07_CB_E4_D7
_________
_on_object_added (/usr/lib64/python3.5/site-packages/blueman/bluez/Manager.py:45)
/org/bluez/hci0/dev_30_75_12_04_F7_2F
_________
on_device_created (/usr/bin/blueman-applet:113)
Device created  /org/bluez/hci0/dev_30_75_12_04_F7_2F
_________
_on_dbus_name_appeared (/usr/bin/blueman-applet:78)
org.bluez :1.336
_________
Run (/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py:208)
Function on_manager_state_changed on DiscvManager Failed
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py", line 212, in Run
ret = getattr(inst, function)(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py", line 57, in on_manager_state_changed
self.update_menuitems()
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py", line 123, in update_menuitems
if (not props["Discoverable"] or props["DiscoverableTimeout"] > 0) and props["Powered"]:
TypeError: 'NoneType' object is not subscriptable
_________
set_nap (/usr/lib64/python3.5/site-packages/blueman/plugins/applet/Networking.py:72)
set nap True
_________
Run (/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py:208)
Function on_manager_state_changed on RecentConns Failed
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py", line 212, in Run
ret = getattr(inst, function)(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/RecentConns.py", line 172, in on_manager_state_changed
self.Adapters[str(adapter.get_object_path())] = str(p["Address"])
TypeError: 'NoneType' object is not subscriptable
_________
register_agent (/usr/lib64/python3.5/site-packages/blueman/main/applet/BluezAgent.py:35)

_________
on_adapter_property_changed (/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py:89)
prop UUIDs ['00001801-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '00001106-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001105-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '00001104-0000-1000-8000-00805f9b34fb', '0000110a-0000-1000-8000-00805f9b34fb', '00001133-0000-1000-8000-00805f9b34fb', '0000112f-0000-1000-8000-00805f9b34fb', '00001132-0000-1000-8000-00805f9b34fb']
_________
Run (/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py:208)
Function on_adapter_property_changed on DiscvManager Failed
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py", line 212, in Run
ret = getattr(inst, function)(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py", line 114, in on_adapter_property_changed
self.update_menuitems()
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py", line 123, in update_menuitems
if (not props["Discoverable"] or props["DiscoverableTimeout"] > 0) and props["Powered"]:
TypeError: 'NoneType' object is not subscriptable
_________
_on_properties_changed (/usr/lib64/python3.5/site-packages/blueman/bluez/PropertiesBase.py:38)
/org/bluez/hci0 UUIDs ['00001801-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '00001106-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001105-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '00001104-0000-1000-8000-00805f9b34fb', '0000110a-0000-1000-8000-00805f9b34fb', '00001133-0000-1000-8000-00805f9b34fb', '0000112f-0000-1000-8000-00805f9b34fb', '00001132-0000-1000-8000-00805f9b34fb']
_________
on_adapter_property_changed (/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py:89)
prop UUIDs ['00001112-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '00001106-0000-1000-8000-00805f9b34fb', '00001800-0000-1000-8000-00805f9b34fb', '00001105-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '00001104-0000-1000-8000-00805f9b34fb', '0000110a-0000-1000-8000-00805f9b34fb', '0000110b-0000-1000-8000-00805f9b34fb', '00001133-0000-1000-8000-00805f9b34fb', '0000112f-0000-1000-8000-00805f9b34fb', '00001132-0000-1000-8000-00805f9b34fb']
_________
Run (/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py:208)
Function on_adapter_property_changed on DiscvManager Failed
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/blueman/main/PluginManager.py", line 212, in Run
ret = getattr(inst, function)(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py", line 114, in on_adapter_property_changed
self.update_menuitems()
File "/usr/lib64/python3.5/site-packages/blueman/plugins/applet/DiscvManager.py", line 123, in update_menuitems
if (not props["Discoverable"] or props["DiscoverableTimeout"] > 0) and props["Powered"]:
KeyError: 'Discoverable'

# Fixed code
def get(self, name):
    prop = self._dbus_proxy.get_cached_property(name)

    if prop is None and name in self.__fallback:
        return self.__fallback[name]
    elif prop is None:
        # Fallback when cached property is not available
        param = GLib.Variant("(ss)", (self._interface_name, name))
        try:
            prop = self._call("Get", param, True)
            return prop[0]
        except GLib.GError:
            raise BluezDBusException("No such property '%s'" % name)
    elif prop is not None:
        return prop.unpack()
    else:
        raise BluezDBusException("No such property '%s'" % name)