git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log: close in cleanup stage
[dpdk.git]
/
usertools
/
dpdk-pmdinfo.py
diff --git
a/usertools/dpdk-pmdinfo.py
b/usertools/dpdk-pmdinfo.py
index
d7eb1ec
..
40ef5ce
100755
(executable)
--- a/
usertools/dpdk-pmdinfo.py
+++ b/
usertools/dpdk-pmdinfo.py
@@
-185,7
+185,7
@@
class PCIIds:
return None
def parse(self):
return None
def parse(self):
- if
len(self.contents) < 1
:
+ if
not self.contents
:
print("data/%s-pci.ids not found" % self.date)
else:
vendorID = ""
print("data/%s-pci.ids not found" % self.date)
else:
vendorID = ""
@@
-193,7
+193,7
@@
class PCIIds:
for l in self.contents:
if l[0] == "#":
continue
for l in self.contents:
if l[0] == "#":
continue
- elif
len(l.strip()) == 0
:
+ elif
not l.strip()
:
continue
else:
if l.find("\t\t") == 0:
continue
else:
if l.find("\t\t") == 0:
@@
-307,7
+307,7
@@
class ReadElf(object):
except KeyError:
continue
except KeyError:
continue
- if
len(pmdinfo["pci_ids"]) != 0
:
+ if
pmdinfo["pci_ids"]
:
print("PMD HW SUPPORT:")
if pcidb is not None:
self.pretty_print_pmdinfo(pmdinfo)
print("PMD HW SUPPORT:")
if pcidb is not None:
self.pretty_print_pmdinfo(pmdinfo)
@@
-346,7
+346,7
@@
class ReadElf(object):
mystring = force_unicode(data[dataptr:endptr])
rc = mystring.find("PMD_INFO_STRING")
if rc != -1:
mystring = force_unicode(data[dataptr:endptr])
rc = mystring.find("PMD_INFO_STRING")
if rc != -1:
- self.parse_pmd_info_string(mystring)
+ self.parse_pmd_info_string(mystring
[rc:]
)
dataptr = endptr
dataptr = endptr
@@
-593,7
+593,7
@@
def main(stream=None):
exit(1)
if args.pdir:
exit(1)
if args.pdir:
- exit(scan_for_autoload_pmds(args
[0]
))
+ exit(scan_for_autoload_pmds(args
.elf_file
))
ldlibpath = os.environ.get('LD_LIBRARY_PATH')
if ldlibpath is None:
ldlibpath = os.environ.get('LD_LIBRARY_PATH')
if ldlibpath is None: