summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-12-01 21:10:51 +0000
committerAlan Conway <aconway@apache.org>2014-12-01 21:10:51 +0000
commit7b330757e5bcff063ebf9db23b9206a84bf78c95 (patch)
tree23654bf5d1147bb069d6f54f013a5ef10dacdcd8
parente29407634e059205ec85364796ed283500420300 (diff)
downloadqpid-python-7b330757e5bcff063ebf9db23b9206a84bf78c95.tar.gz
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
-rwxr-xr-xqpid/tools/src/py/qpid-ha7
1 files 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: