This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] [XM] Fix 'xm help' when called on a comma

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XM] Fix 'xm help' when called on a command-name prefix.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:09:51 +0000
Delivery-date: Thu, 02 Nov 2006 21:43:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID f9446aa6c78632131be1c3042dcc3693e8828136
# Parent  07d3c36df515eb52c3302b05a5f8cb9cff473bf8
[XM] Fix 'xm help' when called on a command-name prefix.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
 tools/python/xen/xm/main.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 07d3c36df515 -r f9446aa6c786 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Sat Oct 28 17:45:43 2006 +0100
+++ b/tools/python/xen/xm/main.py       Thu Oct 05 16:17:06 2006 +0100
@@ -309,6 +309,11 @@ all_commands = (domain_commands + host_c
 def cmdHelp(cmd):
     """Print help for a specific subcommand."""
+    for fc in SUBCOMMAND_HELP.keys():
+        if fc[:len(cmd)] == cmd:
+            cmd = fc
+            break
         args, desc = SUBCOMMAND_HELP[cmd]

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XM] Fix 'xm help' when called on a command-name prefix., Xen patchbot-unstable <=