xm: Fix cmdHelp() for xm reset
PATCH 1/1 xm: Fix cmdHelp() for xm reset
Hi,
I'd like to look at the help message of xm reset command, but the help message of xm resetpolicy command is shown.
# xm reset --help Usage: xm resetpolicy
Set the policy of the system to the default policy.
Reset the system's policy to the default.
When the system's policy is reset, all guest VMs should be halted, since otherwise this operation will fail.
This patch fixes the problem.
# xm reset --help Usage: xm reset <Domain>
Reset a domain.
# xm resetpolicy --help Usage: xm resetpolicy
Set the policy of the system to the default policy.
Reset the system's policy to the default.
When the system's policy is reset, all guest VMs should be halted, since otherwise this operation will fail.
Best regards,
Kan
tools/python/xen/xm/main.py +5 -4
@@ -417,10 +417,11 @@ def cmdHelp(cmd): def cmdHelp(cmd): """Print help for a specific subcommand.""" - for fc in SUBCOMMAND_HELP.keys(): - if fc[:len(cmd)] == cmd: - cmd = fc - break + if not SUBCOMMAND_HELP.has_key(cmd): + for fc in SUBCOMMAND_HELP.keys(): + if fc[:len(cmd)] == cmd: + cmd = fc + break try: args, desc = SUBCOMMAND_HELP[cmd]
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel