From d08d060439caac26d605b998062d35e6664f7b53 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Wed, 22 Nov 2017 09:26:32 +0100 Subject: [PATCH] Fix iteration over list --- Manual.org | 8 ++++---- library/hardware_facts.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Manual.org b/Manual.org index 01b74d6..d41f76a 100644 --- a/Manual.org +++ b/Manual.org @@ -3847,10 +3847,10 @@ def main(): if collect_gpus: gpus = format_gpu_device_list(get_pci_devices()) - nvidia_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'nvidia')) - intel_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'intel')) - amd_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'amd')) - virtualbox_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'virtualbox')) + nvidia_detected = any((True for gpu in gpus if gpu['VendorName'] == 'nvidia')) + intel_detected = any((True for gpu in gpus if gpu['VendorName'] == 'intel')) + amd_detected = any((True for gpu in gpus if gpu['VendorName'] == 'amd')) + virtualbox_detected = any((True for gpu in gpus if gpu['VendorName'] == 'virtualbox')) if collect_acpi_power_modes: acpi_power_modes = list_acpi_power_modes() diff --git a/library/hardware_facts.py b/library/hardware_facts.py index 1fcfc49..3af4d96 100755 --- a/library/hardware_facts.py +++ b/library/hardware_facts.py @@ -152,10 +152,10 @@ def main(): if collect_gpus: gpus = format_gpu_device_list(get_pci_devices()) - nvidia_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'nvidia')) - intel_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'intel')) - amd_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'amd')) - virtualbox_detected = any((True for gpu in gpus.items() if gpu['VendorName'] == 'virtualbox')) + nvidia_detected = any((True for gpu in gpus if gpu['VendorName'] == 'nvidia')) + intel_detected = any((True for gpu in gpus if gpu['VendorName'] == 'intel')) + amd_detected = any((True for gpu in gpus if gpu['VendorName'] == 'amd')) + virtualbox_detected = any((True for gpu in gpus if gpu['VendorName'] == 'virtualbox')) if collect_acpi_power_modes: acpi_power_modes = list_acpi_power_modes()