Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
MPLS support + loop_vm_arp test fix
[nfvbench.git]
/
nfvbench
/
utils.py
diff --git
a/nfvbench/utils.py
b/nfvbench/utils.py
index
3974fd7
..
c8c485f
100644
(file)
--- a/
nfvbench/utils.py
+++ b/
nfvbench/utils.py
@@
-113,8
+113,8
@@
def get_intel_pci(nic_slot=None, nic_ports=None):
if nic_slot and nic_ports:
dmidecode = subprocess.check_output(['dmidecode', '-t', 'slot'])
if nic_slot and nic_ports:
dmidecode = subprocess.check_output(['dmidecode', '-t', 'slot'])
- regex = r"(?<=SlotID:
%s).*?(....:..:..\..)" % nic_slot
- match = re.search(regex, dmidecode, flags=re.DOTALL)
+ regex = r"(?<=SlotID:
{}).*?(....:..:..\..)".format(nic_slot)
+ match = re.search(regex, dmidecode
.decode('utf-8')
, flags=re.DOTALL)
if not match:
return None
if not match:
return None