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
|
@property
|
||||||
def name(self):
|
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
|
@property
|
||||||
def address(self):
|
def address(self):
|
||||||
|
|
Loading…
Reference in New Issue