[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XM] Fix 'xm help' when called on a command-name prefix.



# 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
     
     try:
         args, desc = SUBCOMMAND_HELP[cmd]

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.