The ret_code might be undefined when SIGINT is sent to the test module.
Signed-off-by: Jan Tluka jtluka@redhat.com --- test_modules/Netperf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py index 67d63f3..7c2d1fb 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -391,6 +391,7 @@ class Netperf(TestGeneric): clients.append(ShellProcess(cmd))
for client in clients: + ret_code = None try: ret_code = client.wait() rv += ret_code @@ -401,7 +402,7 @@ class Netperf(TestGeneric): output = client.read_nonblocking() logging.debug(output)
- if ret_code == 0: + if ret_code and ret_code == 0: client_results.append(self._parse_output(output))
if len(client_results) > 0: