提交 ac49ce42 编写于 作者: J Jiri Denemark

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: NJiri Denemark <jdenemar@redhat.com>
上级 c117ecec
......@@ -174,6 +174,8 @@ cpuidMap = [
def parseFeatureWords(path):
features = None
dec = json.JSONDecoder()
with open(path, "r") as f:
s = f.read()
......@@ -220,8 +222,6 @@ def propAdd(props, feature, value):
props[name] = value
dec = json.JSONDecoder()
for path in sys.argv[1:]:
props, cpuid = parseFeatureWords(path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册