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

This commit is contained in:
Jenkins 2012-02-03 23:44:25 +00:00 committed by Gerrit Code Review
commit 3b01068312
1 changed files with 3 additions and 2 deletions

View File

@ -64,8 +64,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):