[libvirt PATCH 01/29] cpu-cpuid: Shorten overly long line

Tim Wiederhake twiederh at redhat.com
Tue Dec 15 16:24:47 UTC 2020


flake8 was complaining.

Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 tests/cputestdata/cpu-cpuid.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py
index 37d00e3c97..dac43debb6 100755
--- a/tests/cputestdata/cpu-cpuid.py
+++ b/tests/cputestdata/cpu-cpuid.py
@@ -158,8 +158,9 @@ def parseMap():
     cpuMap = {}
     for feature in data["cpus"]["feature"]:
         for fType in ["cpuid", "msr"]:
-            if fType in feature:
-                cpuMap[feature["@name"]] = parseMapFeature(fType, feature[fType])
+            if fType not in feature:
+                continue
+            cpuMap[feature["@name"]] = parseMapFeature(fType, feature[fType])
 
     return cpuMap
 
-- 
2.26.2




More information about the libvir-list mailing list