From: Ondrej Lichtner <olichtne(a)redhat.com>
When the module is run in the 'server' role and the option 'bind' is not
specified, the constructed command contains 'None' instead, creating an
invalid command.
This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
test_modules/TestIperf.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test_modules/TestIperf.py b/test_modules/TestIperf.py
index 0a9b047..462c48c 100644
--- a/test_modules/TestIperf.py
+++ b/test_modules/TestIperf.py
@@ -26,7 +26,10 @@ class TestIperf(TestGeneric):
cmd = "iperf --%s %s -t %s %s" % (role, iperf_server,
self.duration, iperf_options)
elif role == "server":
bind = self.get_opt("bind", opt_type="addr")
- cmd = "iperf --%s -B %s %s" % (role, bind, iperf_options)
+ if bind != None:
+ cmd = "iperf --%s -B %s %s" % (role, bind, iperf_options)
+ else:
+ cmd = "iperf --%s %s" % (role, iperf_options)
return cmd
--
1.7.11.7