Merge "Fix stack trace on incorrect nova-manage args."

This commit is contained in:
Jenkins 2012-12-29 00:39:53 +00:00 committed by Gerrit Code Review
commit 4f4ef9f556

View File

@ -1129,8 +1129,11 @@ def main():
try: try:
cliutils.validate_args(fn, *fn_args, **fn_kwargs) cliutils.validate_args(fn, *fn_args, **fn_kwargs)
except cliutils.MissingArgs as e: except cliutils.MissingArgs as e:
# NOTE(mikal): this isn't the most helpful error message ever. It is
# long, and tells you a lot of things you probably don't want to know
# if you just got a single arg wrong.
print fn.__doc__ print fn.__doc__
parser.print_help() CONF.print_help()
print e print e
sys.exit(1) sys.exit(1)
try: try: