Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[NFVBENCH-159] Python3 fix for get_intel_pci()
[nfvbench.git]
/
nfvbench
/
utils.py
diff --git
a/nfvbench/utils.py
b/nfvbench/utils.py
index
c8c485f
..
94cc11d
100644
(file)
--- 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']:
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
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()
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])
pcis.append(port[1])
-
if len(pcis) == 2:
break
if len(pcis) == 2:
break