summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormklyus <mklyus@cisco.com>2020-02-24 01:02:15 +0300
committerYichen Wang <yicwang@cisco.com>2020-02-24 13:15:55 -0800
commit260a2ad0d1edcba289e019ac8a13706663ed6592 (patch)
treedce7776b16626676ded68e12a4d19f476c3056a6
parent057486b092e0a4bb1989121588eb5f8afdb8e1d3 (diff)
[NFVBENCH-159] Python3 fix for get_intel_pci()4.2.1
Change-Id: I09d1f1180b0e80a34a0eec1acf4a1681b15d3e34 Signed-off-by: Yichen Wang <yicwang@cisco.com>
-rw-r--r--nfvbench/utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/nfvbench/utils.py b/nfvbench/utils.py
index c8c485f..94cc11d 100644
--- a/nfvbench/utils.py
+++ b/nfvbench/utils.py
@@ -144,7 +144,7 @@ def get_intel_pci(nic_slot=None, nic_ports=None):
devices = ''
for driver in ['i40e', 'ixgbe']:
- matches = re.findall(regex.format(hx=hx, driver=driver), devices)
+ matches = re.findall(regex.format(hx=hx, driver=driver), devices.decode("utf-8"))
if not matches:
continue
@@ -160,9 +160,8 @@ def get_intel_pci(nic_slot=None, nic_ports=None):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
intf_info, _ = process.communicate()
- if not re.search('team_slave|bond_slave', intf_info):
+ if not re.search('team_slave|bond_slave', intf_info.decode("utf-8")):
pcis.append(port[1])
-
if len(pcis) == 2:
break