From 2734c403782e371adb1d9dc1016de0ebda86d166 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Fri, 20 Apr 2012 13:57:03 +0300 Subject: [PATCH] test: Cannot set both name and passphrase simple-agent could not be used to return both the Name and Passphrase fields for hidden psk networks. Fixes BMC#25058 --- test/simple-agent | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/simple-agent b/test/simple-agent index dac1fed..7b0f5aa 100755 --- a/test/simple-agent +++ b/test/simple-agent @@ -102,16 +102,14 @@ class Agent(dbus.service.Object): def RequestInput(self, path, fields): print "RequestInput (%s,%s)" % (path, fields) - response = None + response = {} if fields.has_key("Name"): - response = self.input_hidden() - elif fields.has_key("Passphrase"): - response = self.input_passphrase() - elif fields.has_key("Username"): - response = self.input_username() - else: - print "No method to answer the input request" + response.update(self.input_hidden()) + if fields.has_key("Passphrase"): + response.update(self.input_passphrase()) + if fields.has_key("Username"): + response.update(self.input_username()) print "returning (%s)" % (response) -- 2.7.4