scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd
PATCH 1/1 scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd
From: Zhao Liu <[email protected]>
When run this script, there's the error:
python3 scripts/cpu-x86-uarch-abi.py /tmp/qmp
Traceback (most recent call last):
File "/path-to-qemu/qemu/scripts/cpu-x86-uarch-abi.py", line 96, in <module>
cpu = shell.cmd("query-cpu-model-expansion",
TypeError: QEMUMonitorProtocol.cmd() takes 2 positional arguments but 3 were given
Commit 7f521b023bc28 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()") converts the the original .cmd() to .command() (which was later renamed to "cmd" to replace the original one).
But the new .cmd() only accepts typing.Mapping as the parameter instead of typing.Dict (see _qmp.execute()).
Change the paremeters of "query-cpu-model-expansion" to typing.Mapping format to fix this error.
--- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/cpu-x86-uarch-abi.py +2 -2
@@ -94,8 +94,8 @@ for name in sorted(names): cpu = shell.cmd("query-cpu-model-expansion", - { "type": "static", - "model": { "name": name }}) + type="static", + model={ "name": name }) got = {} for (feature, present) in cpu["model"]["props"].items():
Signature · 1 line
2.34.1
Quoted 31 lines · Zhao Liu
From: Zhao Liu <[email protected]>
When run this script, there's the error:
python3
scripts/cpu-x86-uarch-abi.py/tmp/qmp
Traceback (most recent call last):
File "/path-to-qemu/qemu/scripts/cpu-x86-uarch-abi.py", line 96, in <module>
cpu = shell.cmd("query-cpu-model-expansion",
TypeError:QEMUMonitorProtocol.cmd()takes 2 positional arguments but 3 were givenCommit
7f521b023bc28("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()") converts the the original .cmd() to .command() (which was later renamed to "cmd" to replace the original one).But the new .cmd() only accepts typing.Mapping as the parameter instead of typing.Dict (see
_qmp.execute()).Change the paremeters of "query-cpu-model-expansion" to typing.Mapping format to fix this error.
Fixes 7f521b023bc28 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")Signed-off-by Zhao Liu <[email protected]>--- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/cpu-x86-uarch-abi.py +0
-0
scripts/cpu-x86-uarch-abi.py line 101
Quoted 10 lines
scripts/cpu-x86-uarch-abi.py +2
-2@@ -94,8 +94,8 @@ for name in sorted(names): cpu = shell.cmd("query-cpu-model-expansion", - { "type": "static", - "model": { "name": name }}) + type="static", + model={ "name": name }) got = {} for (feature, present) in cpu["model"]["props"].items():
Oh, right, thanks for fixing:
Signature · 2 lines
Best regards, Vladimir
Quoted 48 lines · Vladimir Sementsov-Ogievskiy
Date: Wed, 18 Oct 2023 13:18:51 +0300
From: Vladimir Sementsov-Ogievskiy <[email protected]>
Subject: Re: [PATCH]scripts/cpu-x86-uarch-abi.py: Fix parameter error of
cmdQuoted 31 lines · Zhao Liu
From: Zhao Liu <[email protected]>
When run this script, there's the error:
python3
scripts/cpu-x86-uarch-abi.py/tmp/qmp
Traceback (most recent call last):
File "/path-to-qemu/qemu/scripts/cpu-x86-uarch-abi.py", line 96, in <module>
cpu = shell.cmd("query-cpu-model-expansion",
TypeError:QEMUMonitorProtocol.cmd()takes 2 positional arguments but 3 were givenCommit
7f521b023bc28("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()") converts the the original .cmd() to .command() (which was later renamed to "cmd" to replace the original one).But the new .cmd() only accepts typing.Mapping as the parameter instead of typing.Dict (see
_qmp.execute()).Change the paremeters of "query-cpu-model-expansion" to typing.Mapping format to fix this error.
Fixes 7f521b023bc28 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")Signed-off-by Zhao Liu <[email protected]>--- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/cpu-x86-uarch-abi.py +0
-0scripts/cpu-x86-uarch-abi.py line 99
Quoted 8 lines
scripts/cpu-x86-uarch-abi.py +2
-2@@ -94,8 +94,8 @@ for name in sorted(names): cpu = shell.cmd("query-cpu-model-expansion", - { "type": "static", - "model": { "name": name }}) + type="static", + model={ "name": name }) got = {} for (feature, present) in cpu["model"]["props"].items():Oh, right, thanks for fixing:
Quoted 1 line
Reviewed-by Vladimir Sementsov-Ogievskiy <[email protected]>
Thanks Vladimir!
-Zhao
Hi John and Cleber,
Just a ping. :)
Regards,
Zhao
Quoted 49 lines · Zhao Liu
Date: Wed, 18 Oct 2023 18:00:11 +0800
From: Zhao Liu <[email protected]>
Subject: [PATCH]scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd
X-Mailer: git-send-email 2.34.1From: Zhao Liu <[email protected]>
When run this script, there's the error:
python3
scripts/cpu-x86-uarch-abi.py/tmp/qmp
Traceback (most recent call last):
File "/path-to-qemu/qemu/scripts/cpu-x86-uarch-abi.py", line 96, in <module>
cpu = shell.cmd("query-cpu-model-expansion",
TypeError:QEMUMonitorProtocol.cmd()takes 2 positional arguments but 3 were givenCommit
7f521b023bc28("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()") converts the the original .cmd() to .command() (which was later renamed to "cmd" to replace the original one).But the new .cmd() only accepts typing.Mapping as the parameter instead of typing.Dict (see
_qmp.execute()).Change the paremeters of "query-cpu-model-expansion" to typing.Mapping format to fix this error.
Fixes 7f521b023bc28 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")Signed-off-by Zhao Liu <[email protected]>--- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/cpu-x86-uarch-abi.py +2
-2@@ -94,8 +94,8 @@ for name in sorted(names): cpu = shell.cmd("query-cpu-model-expansion", - { "type": "static", - "model": { "name": name }}) + type="static", + model={ "name": name }) got = {} for (feature, present) in cpu["model"]["props"].items():Signature · 1 line
2.34.1
Quoted 17 lines · Zhao Liu
From: Zhao Liu <[email protected]>
When run this script, there's the error:
python3
scripts/cpu-x86-uarch-abi.py/tmp/qmp
Traceback (most recent call last):
File "/path-to-qemu/qemu/scripts/cpu-x86-uarch-abi.py", line 96, in <module>
cpu = shell.cmd("query-cpu-model-expansion",
TypeError:QEMUMonitorProtocol.cmd()takes 2 positional arguments but 3 were givenCommit
7f521b023bc28("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()") converts the the original .cmd() to .command() (which was later renamed to "cmd" to replace the original one).But the new .cmd() only accepts typing.Mapping as the parameter instead of typing.Dict (see
_qmp.execute()).
Quoted 8 lines
Change the paremeters of "query-cpu-model-expansion" to typing.Mapping format to fix this error.
Fixes 7f521b023bc28 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")Signed-off-by Zhao Liu <[email protected]>--- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
I'll queue this one and sent a PULL before the final release.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 32 lines · Daniel P. Berrangé
Date: Tue, 7 Nov 2023 14:15:34 +0000
From: "Daniel P. Berrangé" <[email protected]>
Subject: Re: [PATCH]scripts/cpu-x86-uarch-abi.py: Fix parameter error of
cmdQuoted 17 lines · Zhao Liu
From: Zhao Liu <[email protected]>
When run this script, there's the error:
python3
scripts/cpu-x86-uarch-abi.py/tmp/qmp
Traceback (most recent call last):
File "/path-to-qemu/qemu/scripts/cpu-x86-uarch-abi.py", line 96, in <module>
cpu = shell.cmd("query-cpu-model-expansion",
TypeError:QEMUMonitorProtocol.cmd()takes 2 positional arguments but 3 were givenCommit
7f521b023bc28("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()") converts the the original .cmd() to .command() (which was later renamed to "cmd" to replace the original one).But the new .cmd() only accepts typing.Mapping as the parameter instead of typing.Dict (see
_qmp.execute()).Quoted 8 lines
Change the paremeters of "query-cpu-model-expansion" to typing.Mapping format to fix this error.
Fixes 7f521b023bc28 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")Signed-off-by Zhao Liu <[email protected]>--- scripts/cpu-x86-uarch-abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Reviewed-by Daniel P. Berrangé <[email protected]>I'll queue this one and sent a PULL before the final release.
Thanks!
Regards,
Zhao
Quoted 8 lines
With regards,
DanielSignature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|