test: Update list-contexts to the new API

This commit is contained in:
Denis Kenzior 2011-03-10 22:07:21 -06:00
parent bc0cc47608
commit 4b972b3f7a
1 changed files with 4 additions and 1 deletions

View File

@ -24,13 +24,16 @@ for path, properties in modems:
print " [ %s ]" % (path)
for key in properties.keys():
if key in ["Settings"]:
if key in ["Settings"] or key in ["IPv6.Settings"]:
val = "{"
for i in properties[key].keys():
val += " " + i + "="
if i in ["DomainNameServers"]:
for n in properties[key][i]:
val += n + ","
elif i in ["PrefixLength"]:
p = int(properties[key][i])
val += str(p)
else:
val += properties[key][i]
val += " }"