mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
cputest: Move instantiation of JSONDecoder in cpu-convert.py
Let's make the object local to the parseFeatureWords function which uses it. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
c117ecec91
commit
ac49ce42ef
@ -174,6 +174,8 @@ cpuidMap = [
|
|||||||
def parseFeatureWords(path):
|
def parseFeatureWords(path):
|
||||||
features = None
|
features = None
|
||||||
|
|
||||||
|
dec = json.JSONDecoder()
|
||||||
|
|
||||||
with open(path, "r") as f:
|
with open(path, "r") as f:
|
||||||
s = f.read()
|
s = f.read()
|
||||||
|
|
||||||
@ -220,8 +222,6 @@ def propAdd(props, feature, value):
|
|||||||
props[name] = value
|
props[name] = value
|
||||||
|
|
||||||
|
|
||||||
dec = json.JSONDecoder()
|
|
||||||
|
|
||||||
for path in sys.argv[1:]:
|
for path in sys.argv[1:]:
|
||||||
props, cpuid = parseFeatureWords(path)
|
props, cpuid = parseFeatureWords(path)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user