summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-14 00:37:10 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-14 00:37:10 +0100
commit99515f9c0d4818aa99eb227657954a2d9f1d3ae3 (patch)
tree99575d4bf413616031248fc5f2554905849d4873 /test
parent9c4dd9603160c08f38109571d7c6eebfdfc86d83 (diff)
downloadconnman-99515f9c0d4818aa99eb227657954a2d9f1d3ae3.tar.gz
connman-99515f9c0d4818aa99eb227657954a2d9f1d3ae3.tar.bz2
connman-99515f9c0d4818aa99eb227657954a2d9f1d3ae3.zip
Print signal strength as integer
Diffstat (limited to 'test')
-rwxr-xr-xtest/monitor-connman6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/monitor-connman b/test/monitor-connman
index 2c4b9bdd..0c4a2efc 100755
--- a/test/monitor-connman
+++ b/test/monitor-connman
@@ -7,7 +7,11 @@ import dbus.mainloop.glib
def property_changed(name, value, path, interface):
iface = interface[interface.rfind(".") + 1:]
- print "{%s} [%s] %s = %s" % (iface, path, name, str(value))
+ if (name == "WiFi.Strength"):
+ val = int(value)
+ else:
+ val = str(value)
+ print "{%s} [%s] %s = %s" % (iface, path, name, val)
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)