Update test script with more property tweaks

This commit is contained in:
Marcel Holtmann 2009-09-06 07:35:11 +02:00
parent 094fdd4e71
commit 041b192fcd
1 changed files with 13 additions and 3 deletions

View File

@ -30,15 +30,25 @@ for path in properties["Modems"]:
object = dbus.Interface(bus.get_object('org.ofono', path),
interface)
properties = object.GetProperties()
print " [ %s ]" % (interface)
try:
properties = object.GetProperties()
except:
continue
for key in properties.keys():
if key in ["AvailableOperators", "SubscriberNumbers"]:
if key in ["AvailableOperators", "Calls",
"MultipartyCalls",
"EmergencyNumbers",
"SubscriberNumbers",
"ServiceDiallingNumbers"]:
val = ""
for i in properties[key]:
val += i + " "
elif key in ["MobileNetworkCodeLength",
"VoicemailMessageCount"]:
val = int(properties[key])
else:
val = str(properties[key])
print " %s = %s" % (key, val)