ia64/xen-unstable

changeset 17529:ffa511df6c23

xm: Fix cmdHelp() for xm reset

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 25 13:40:05 2008 +0100 (2008-04-25)
parents 6032730df2eb
children 1c6008fc4d9a
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Fri Apr 25 13:38:22 2008 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Fri Apr 25 13:40:05 2008 +0100
     1.3 @@ -417,10 +417,11 @@ server = None
     1.4  def cmdHelp(cmd):
     1.5      """Print help for a specific subcommand."""
     1.6      
     1.7 -    for fc in SUBCOMMAND_HELP.keys():
     1.8 -        if fc[:len(cmd)] == cmd:
     1.9 -            cmd = fc
    1.10 -            break
    1.11 +    if not SUBCOMMAND_HELP.has_key(cmd):
    1.12 +        for fc in SUBCOMMAND_HELP.keys():
    1.13 +            if fc[:len(cmd)] == cmd:
    1.14 +                cmd = fc
    1.15 +                break
    1.16      
    1.17      try:
    1.18          args, desc = SUBCOMMAND_HELP[cmd]