X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=pypci.py;h=6800aca811c54e9f50368cfcf65bc9cd26e5362c;hb=147cef1b174d327213a96375165e12fe2f8a9420;hp=dcbe7bd7befeb58da2305df6c2ec24f882777daa;hpb=92477fe994ad28526949b44b56e6a93c2d0cd422;p=pypcilib.git diff --git a/pypci.py b/pypci.py index dcbe7bd..6800aca 100644 --- a/pypci.py +++ b/pypci.py @@ -4,7 +4,7 @@ def get_devices(): """ This is a replacement to the pypciscan library.""" ret = {} - pci_cmd = os.popen("""/sbin/lspci -Dnvm | sed -e 's/\t/ /g' -e 's/^/"/' -e 's/$/"/' -e 's/$/,/' -e 's/^"",$/],[/'""", 'r') + pci_cmd = os.popen("""/sbin/lspci -nvm | sed -e 's/\t/ /g' -e 's/ Class / /' -e 's/^/"/' -e 's/$/"/' -e 's/$/,/' -e 's/^"",$/],[/'""", 'r') pci_str = "[" + pci_cmd.read() + "]" pci_list = eval(pci_str)