Skip to content
  • Zhao Liu's avatar
    3e7ebf58
    scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd · 3e7ebf58
    Zhao Liu authored
    
    
    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 7f521b02 ("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: 7f521b02 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")
    
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
    Signed-off-by: default avatarZhao Liu <zhao1.liu@intel.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    3e7ebf58
    scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd
    Zhao Liu authored
    
    
    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 7f521b02 ("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: 7f521b02 ("scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()")
    
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
    Signed-off-by: default avatarZhao Liu <zhao1.liu@intel.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Loading