X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=usertools%2Fdpdk-pmdinfo.py;h=f9ed7551769cdb9bd7fc97f1cdb3bd9379e7a2e8;hb=c94366cfc641c6ae43d01c2ac4c6b8993817b356;hp=9d5c6369a017472e28bdb57b3295fecf3d06f442;hpb=e1766e7b0c9b4ad30b330677f2376a05b3b46f0c;p=dpdk.git diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index 9d5c6369a0..f9ed755176 100755 --- a/usertools/dpdk-pmdinfo.py +++ b/usertools/dpdk-pmdinfo.py @@ -28,7 +28,9 @@ raw_output = False pcidb = None # =========================================== - +if sys.version_info.major < 3: + print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) + print("Please use Python 3 instead", file=sys.stderr) class Vendor: """ @@ -561,7 +563,10 @@ def main(stream=None): pcifile_default = "./pci.ids" # For unknown OS's assume local file if platform.system() == 'Linux': - pcifile_default = "/usr/share/hwdata/pci.ids" + # hwdata is the legacy location, misc is supported going forward + pcifile_default = "/usr/share/misc/pci.ids" + if not os.path.exists(pcifile_default): + pcifile_default = "/usr/share/hwdata/pci.ids" elif platform.system() == 'FreeBSD': pcifile_default = "/usr/local/share/pciids/pci.ids" if not os.path.exists(pcifile_default):