From 85fe14ffd25275074f7614714d221b215a07b7b8 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Fri, 20 Apr 2018 11:06:45 +0200 Subject: [PATCH] Fix glob command to collect pci device information --- Manual.org | 2 +- library/hardware_facts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Manual.org b/Manual.org index e7fd39c..3ffecb2 100644 --- a/Manual.org +++ b/Manual.org @@ -4623,7 +4623,7 @@ vendor_dict = { } def get_pci_devices(): - for device in glob.glob('/sys/devices/pci*/*:*:*/*:*:*/'): + for device in glob.glob('/sys/devices/pci*/*:*:*/'): try: with open(os.path.join(device, 'device')) as d: product_id = int(d.read().strip(), 16) diff --git a/library/hardware_facts.py b/library/hardware_facts.py index 3af4d96..2c7d963 100755 --- a/library/hardware_facts.py +++ b/library/hardware_facts.py @@ -81,7 +81,7 @@ vendor_dict = { } def get_pci_devices(): - for device in glob.glob('/sys/devices/pci*/*:*:*/*:*:*/'): + for device in glob.glob('/sys/devices/pci*/*:*:*/'): try: with open(os.path.join(device, 'device')) as d: product_id = int(d.read().strip(), 16)