From: Faiyaz Ahmed Date: Mon, 17 Mar 2008 17:08:13 +0000 (+0000) Subject: lspci on older bootCDs don't support the -D flag. Also none of our machines are... X-Git-Tag: pypcilib-0.2-1~3 X-Git-Url: http://git.onelab.eu/?p=pypcilib.git;a=commitdiff_plain;h=978a2bd0aea6cc1a7ea6e7842c86da0c7f75af4e lspci on older bootCDs don't support the -D flag. Also none of our machines are running a hypervisor. I assume that's what 'domain' implies. --- diff --git a/pypci.py b/pypci.py index dcbe7bd..c783b40 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/^/"/' -e 's/$/"/' -e 's/$/,/' -e 's/^"",$/],[/'""", 'r') pci_str = "[" + pci_cmd.read() + "]" pci_list = eval(pci_str)