Fix context processing test script when no gateway is provided

This commit is contained in:
Marcel Holtmann 2010-08-10 16:18:18 -04:00
parent 3d19a00cd7
commit 945a621a2d
2 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,10 @@ for path in properties["Modems"]:
interface = settings["Interface"]
address = settings["Address"]
gateway = settings["Gateway"]
try:
gateway = settings["Gateway"]
except:
gateway = "0.0.0.0";
if settings["Method"] == "dhcp":
print " Run DHCP on interface %s" % (interface)

View File

@ -86,7 +86,7 @@ if __name__ == "__main__":
call.connect_to_signal("PropertyChanged", voicecall_property_changed)
gobject.timeout_add(10000, hangup_all)
gobject.timeout_add(1000000, hangup_all)
mainloop = gobject.MainLoop()
mainloop.run()