X-Git-Url: http://git.onelab.eu/?p=pypcilib.git;a=blobdiff_plain;f=pypci.py;h=6800aca811c54e9f50368cfcf65bc9cd26e5362c;hp=c783b4085037703ebf41e618b86b86d378a6ba44;hb=147cef1b174d327213a96375165e12fe2f8a9420;hpb=978a2bd0aea6cc1a7ea6e7842c86da0c7f75af4e diff --git a/pypci.py b/pypci.py index c783b40..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 -nvm | 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)