summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-09 17:23:29 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-09 17:23:29 +0000
commit058ed7e1548bd66579365a7f8ca1c35ddc05e1da (patch)
treeeff850d222c06383bdd03d6ea326f9471186dbc8 /hcid
parent3d3cdef8da6b3e1b14c3cdccda8c099cbad4f3ae (diff)
A little bit pretty-print for the record
Diffstat (limited to 'hcid')
-rwxr-xr-xhcid/test-device7
1 files changed, 6 insertions, 1 deletions
diff --git a/hcid/test-device b/hcid/test-device
index fe448bee..05a23d37 100755
--- a/hcid/test-device
+++ b/hcid/test-device
@@ -2,6 +2,7 @@
import sys
import dbus
+import re
bus = dbus.SystemBus()
@@ -56,7 +57,11 @@ if (sys.argv[1] == "discover"):
pattern = sys.argv[3]
services = device.DiscoverServices(pattern);
for key in services.keys():
- print "0x%5x = %s" % (key, services[key])
+ p = re.compile(">.*?<")
+ xml = p.sub("><", services[key].replace("\n", ""))
+ print "[ 0x%5x ]" % (key)
+ print xml
+ print
sys.exit(0)
if (sys.argv[1] == "class"):