summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@nokia.com>2010-12-02 16:09:16 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-12-02 16:48:11 +0100
commite14daf15e2425ed7423e9a3db84800926f36fa10 (patch)
treeee3932f6292e605e9194a919376d73b9ee127fdf /test
parent164c97cf932c31b6de2ed94f583daebe20b88dfc (diff)
downloadconnman-e14daf15e2425ed7423e9a3db84800926f36fa10.tar.gz
connman-e14daf15e2425ed7423e9a3db84800926f36fa10.tar.bz2
connman-e14daf15e2425ed7423e9a3db84800926f36fa10.zip
test: simple-agent support for ReportError method call
simple-agent receives the ReportError method call and prompts whether to retry the service.
Diffstat (limited to 'test')
-rwxr-xr-xtest/simple-agent15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/simple-agent b/test/simple-agent
index 54e857a4..859d4037 100755
--- a/test/simple-agent
+++ b/test/simple-agent
@@ -33,6 +33,21 @@ class Agent(dbus.service.Object):
return response
@dbus.service.method("net.connman.Agent",
+ in_signature='os',
+ out_signature='')
+ def ReportError(self, path, error):
+ print "ReportError %s, %s" % (path, error)
+ retry = raw_input("Retry service (yes/no): ")
+ if (retry == "yes"):
+ class Retry(dbus.DBusException):
+ _dbus_error_name = "net.connman.Agent.Error.Retry"
+
+ raise Retry("retry service")
+ else:
+ return
+
+
+ @dbus.service.method("net.connman.Agent",
in_signature='', out_signature='')
def Cancel(self):
print "Cancel"