test-discovery: Fix printing non-ASCII characters

This commit is contained in:
Johan Hedberg 2012-03-12 14:03:57 +02:00
parent 5e5cbd0637
commit d5c860b4f4

View File

@ -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: