[V4,3/3] framework: check the python version

Message ID 20201023081411.33229-4-yufengx.mo@intel.com (mailing list archive)
State Superseded
Headers
Series framework: check the python version |

Commit Message

Yufen.Mo Oct. 23, 2020, 8:14 a.m. UTC
  check the python version of tester. If the version is python2, print a warning message.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 framework/tester.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/framework/tester.py b/framework/tester.py
index ca179b2..482b0e4 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -43,7 +43,8 @@  from crb import Crb
 from net_device import GetNicObj
 from etgen import IxiaPacketGenerator, SoftwarePacketGenerator
 import random
-from utils import GREEN, convert_int2ip, convert_ip2int
+from utils import (GREEN, convert_int2ip, convert_ip2int,
+                   check_crb_python_version)
 from exception import ParameterInvalidException
 from multiprocessing import Process
 from pktgen import getPacketGenerator
@@ -66,6 +67,8 @@  class Tester(Crb):
         self.NAME = 'tester'
         self.scapy_session = None
         super(Tester, self).__init__(crb, serializer, self.NAME)
+        # check the python version of tester
+        check_crb_python_version(self)
 
         self.bgProcIsRunning = False
         self.duts = None