projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
271cf5f
)
Extract IPv4 and Ethernet values from service monitor script
author
Marcel Holtmann
<marcel@holtmann.org>
Mon, 1 Feb 2010 01:29:50 +0000
(17:29 -0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Mon, 1 Feb 2010 01:29:50 +0000
(17:29 -0800)
test/monitor-services
patch
|
blob
|
history
diff --git
a/test/monitor-services
b/test/monitor-services
index
7d65447
..
9b293c7
100755
(executable)
--- a/
test/monitor-services
+++ b/
test/monitor-services
@@
-5,6
+5,14
@@
import gobject
import dbus
import dbus.mainloop.glib
import dbus
import dbus.mainloop.glib
+def extract_values(values):
+ val = "{"
+ for key in values.keys():
+ val += " " + key + "="
+ val += str(values[key])
+ val += " }"
+ return val
+
def property_changed(name, value, path, interface):
iface = interface[interface.rfind(".") + 1:]
ipath = path[path.rfind("/") + 1:]
def property_changed(name, value, path, interface):
iface = interface[interface.rfind(".") + 1:]
ipath = path[path.rfind("/") + 1:]
@@
-16,6
+24,8
@@
def property_changed(name, value, path, interface):
for i in value:
val = val + " " + i[i.rfind("/") + 1:]
val = val + " ]"
for i in value:
val = val + " " + i[i.rfind("/") + 1:]
val = val + " ]"
+ elif name in ["IPv4", "IPv4.Configuration", "Proxy", "Ethernet"]:
+ val = extract_values(value)
elif name in ["Strength", "Priority"]:
val = int(value)
else:
elif name in ["Strength", "Priority"]:
val = int(value)
else: