From f5035b341009505bf4f24c52a3aae548a6b238ea Mon Sep 17 00:00:00 2001 From: Yong Sheng Gong Date: Thu, 24 May 2012 14:59:32 +0800 Subject: [PATCH] quit and print usage when unsupported version specified. bug 974835 Change-Id: Iddbf72281be0d4dd819b6f51cc7950d90af0dbbc --- quantumclient/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quantumclient/cli.py b/quantumclient/cli.py index 163663901..6c14f632e 100755 --- a/quantumclient/cli.py +++ b/quantumclient/cli.py @@ -280,7 +280,8 @@ def main(): version = options.version if not version in commands: LOG.error("Unknown API version specified:%s", version) - print "Unknown API version: %s" % version + parser.print_help() + sys.exit(1) if len(args) < 1: parser.print_help()