[dts] [PATCH V1 5/5] framework/virt_dut:optimize code
Haiyang Zhao
haiyangx.zhao at intel.com
Wed Jan 15 10:12:27 CET 2020
*.when out returned by self.tester.send_ping6 is None,
it will raise an exception, and cause VM init failed, fixed it.
*.fix pep8 issue.
Signed-off-by: Haiyang Zhao <haiyangx.zhao at intel.com>
---
framework/virt_dut.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/virt_dut.py b/framework/virt_dut.py
index a916b72..ebd48d8 100644
--- a/framework/virt_dut.py
+++ b/framework/virt_dut.py
@@ -411,7 +411,7 @@ class VirtDut(DPDKdut):
out = self.tester.send_ping6(
remotePort, ipv6, self.get_mac_address(vmPort))
- if ('64 bytes from' in out):
+ if out and '64 bytes from' in out:
self.logger.info(
"PORT MAP: [dut %d: tester %d]" % (vmPort, remotePort))
self.ports_map[vmPort] = remotePort
--
1.8.3.1
More information about the dts
mailing list