Fix pylint issues in netperf
[functest-kubernetes.git] / functest_kubernetes / netperf / netperf.py
index b364208..7832e6d 100644 (file)
@@ -60,9 +60,10 @@ class Netperf(testcase.TestCase):
             self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
             self.result = 100
             status = testcase.TestCase.EX_OK
-        except subprocess.SubprocessError as exc:
+        except (subprocess.TimeoutExpired,
+                subprocess.CalledProcessError) as exc:
             self.__logger.exception(
-                "Cannot run Netperf:\n%s", ' '.join(exc.cmd),
+                "Cannot run %s:\n%s", ' '.join(exc.cmd),
                 exc.output.decode("utf-8"))
             self.result = 0
             status = testcase.TestCase.EX_RUN_ERROR