Fix glob command to collect pci device information
This commit is contained in:
parent
4f857589d9
commit
85fe14ffd2
@ -4623,7 +4623,7 @@ vendor_dict = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_pci_devices():
|
def get_pci_devices():
|
||||||
for device in glob.glob('/sys/devices/pci*/*:*:*/*:*:*/'):
|
for device in glob.glob('/sys/devices/pci*/*:*:*/'):
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(device, 'device')) as d:
|
with open(os.path.join(device, 'device')) as d:
|
||||||
product_id = int(d.read().strip(), 16)
|
product_id = int(d.read().strip(), 16)
|
||||||
|
@ -81,7 +81,7 @@ vendor_dict = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_pci_devices():
|
def get_pci_devices():
|
||||||
for device in glob.glob('/sys/devices/pci*/*:*:*/*:*:*/'):
|
for device in glob.glob('/sys/devices/pci*/*:*:*/'):
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(device, 'device')) as d:
|
with open(os.path.join(device, 'device')) as d:
|
||||||
product_id = int(d.read().strip(), 16)
|
product_id = int(d.read().strip(), 16)
|
||||||
|
Loading…
Reference in New Issue
Block a user