]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu-cpuid: Shorten overly long line
authorTim Wiederhake <twiederh@redhat.com>
Tue, 15 Dec 2020 16:24:47 +0000 (17:24 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Dec 2020 22:19:27 +0000 (23:19 +0100)
flake8 was complaining.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/cputestdata/cpu-cpuid.py

index 37d00e3c9775ce1f3fea3ff9398dc2b1d5d89f17..dac43debb6a69338494eff5f70e61def96ef8c50 100755 (executable)
@@ -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