moves the "help" in the usage information of a wrong command to the correct position

fixes bug 922047

Change-Id: I9fdd76bd995a9bc4c469a8bcb47fe0e7f8a3d261
This commit is contained in:
Christian Berendt 2012-01-26 13:36:39 +01:00
parent 36be4bf575
commit 0847282fd8
1 changed files with 3 additions and 2 deletions

View File

@ -60,8 +60,9 @@ class NovaClientArgumentParser(argparse.ArgumentParser):
self.print_usage(sys.stderr)
#FIXME(lzyeval): if changes occur in argparse.ArgParser._check_value
choose_from = ' (choose from'
self.exit(2, "error: %s\nTry `%s help' for more information.\n" %
(message.split(choose_from)[0], self.prog))
self.exit(2, "error: %s\nTry `%s' for more information.\n" %
(message.split(choose_from)[0],
self.prog.replace(" ", " help ", 1)))
class OpenStackComputeShell(object):