ble: don't crash if a device doesn't have a Name attribute
Hello, tradies next door with your weird phones...
This commit is contained in:
parent
63ba0462ea
commit
f9ba9fe6ca
|
@ -120,7 +120,10 @@ class BlueZDevice(GObject.Object):
|
|||
|
||||
@property
|
||||
def name(self):
|
||||
return self.interface.get_cached_property('Name').unpack()
|
||||
try:
|
||||
return self.interface.get_cached_property('Name').unpack()
|
||||
except AttributeError:
|
||||
return 'UNKNOWN'
|
||||
|
||||
@property
|
||||
def address(self):
|
||||
|
|
Loading…
Reference in New Issue