mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 05:34:23 +08:00
test-discovery: Fix printing non-ASCII characters
This commit is contained in:
parent
5e5cbd0637
commit
d5c860b4f4
@ -11,6 +11,8 @@ def device_found(address, properties):
|
||||
|
||||
for key in properties.keys():
|
||||
value = properties[key]
|
||||
if type(value) is dbus.String:
|
||||
value = unicode(value).encode('ascii', 'replace')
|
||||
if (key == "Class"):
|
||||
print " %s = 0x%06x" % (key, value)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user