From 0847282fd8d1f7d9a2cb985b492307a42d439a4f Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 26 Jan 2012 13:36:39 +0100 Subject: [PATCH] moves the "help" in the usage information of a wrong command to the correct position fixes bug 922047 Change-Id: I9fdd76bd995a9bc4c469a8bcb47fe0e7f8a3d261 --- novaclient/shell.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/novaclient/shell.py b/novaclient/shell.py index 7f7254b07..39983cd15 100644 --- a/novaclient/shell.py +++ b/novaclient/shell.py @@ -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):