From 3ec1b8a66c2858ec9df1553da94e2fb8f6f1eb5f Mon Sep 17 00:00:00 2001 From: Erik Bjorge Date: Tue, 7 Dec 2021 16:46:13 -0800 Subject: [PATCH] Detect presence of SKU entries The use of the iter method should not be used to determine if a SKU entry exists as it will always return a tree iterator. Instead the find method is used to determine if at least one SKU entry is present. Signed-off-by: Erik Bjorge --- chipsec/chipset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chipsec/chipset.py b/chipsec/chipset.py index e3d4b445..c8b3420f 100644 --- a/chipsec/chipset.py +++ b/chipsec/chipset.py @@ -419,7 +419,7 @@ class Chipset: self.detection_dictionary[format(rdv_value,'X')] = _cfg.attrib['platform'].upper() else: self.detection_dictionary[dv.strip().upper()] = _cfg.attrib['platform'].upper() - if _info.iter('sku'): + if _info.find('sku') is not None: _det = "" _did = "" for _sku in _info.iter('sku'):