Still needed...
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Mon, 17 Mar 2008 20:27:12 +0000 (20:27 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Mon, 17 Mar 2008 20:27:12 +0000 (20:27 +0000)
pypci.py

index c783b40..6800aca 100644 (file)
--- 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)