WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[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: Fri, 06 Oct 2006 12:30:20 +0000
Delivery-date: Fri, 06 Oct 2006 05:31:29 -0700
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 efb8b20004b751330a80d6dc21c7199566802e66
# Parent  bf0deb09facd847db87ab59ed377db6eb0f5a3ad
[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 bf0deb09facd -r efb8b20004b7 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Oct 05 16:14:50 2006 +0100
+++ b/tools/python/xen/xm/main.py       Thu Oct 05 16:17:06 2006 +0100
@@ -290,6 +290,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
     
     try:
         args, desc = SUBCOMMAND_HELP[cmd]

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<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 <=