From 7b330757e5bcff063ebf9db23b9206a84bf78c95 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 1 Dec 2014 21:10:51 +0000 Subject: NO-JIRA: qpid-ha don't return error status if called with -h or --help flag. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1642758 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/tools/src/py/qpid-ha | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qpid/tools/src/py/qpid-ha b/qpid/tools/src/py/qpid-ha index 10be34475c..76d9abde79 100755 --- a/qpid/tools/src/py/qpid-ha +++ b/qpid/tools/src/py/qpid-ha @@ -261,8 +261,11 @@ def main_except(argv): if "--cluster-manager" in args: commands += ManagerCommand.manager_commands args.remove("--cluster-manager") - if "--help-all" in args: - for c in commands: c.op.print_help(); print + if len(args) and args[0] in ['help', '--help', '-help', '-h', 'help-all', '--help-all']: + if 'help-all' in args[0]: + for c in commands: c.op.print_help(); print + else: + print_usage(os.path.basename(argv[0])); else: command = find_command(args, commands) if command: -- cgit v1.2.1