summaryrefslogtreecommitdiff
path: root/tools/src/py/qpid-tool
diff options
context:
space:
mode:
authorNuno Santos <nsantos@apache.org>2010-05-24 23:19:11 +0000
committerNuno Santos <nsantos@apache.org>2010-05-24 23:19:11 +0000
commit5e3d7c8162f1bbc7ba744ee779fa0a4339439438 (patch)
treebcaf9b380ad4c93c5c1af247c0cb491358760732 /tools/src/py/qpid-tool
parent7981b9d46fec43ff7b6969fca20c59d8c43b25eb (diff)
downloadqpid-python-5e3d7c8162f1bbc7ba744ee779fa0a4339439438.tar.gz
Make behavior of command line tools consistent, regarding -h and --help options, as well as giving an appropriate error message for any invalid options passed on the command line
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@947858 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools/src/py/qpid-tool')
-rwxr-xr-xtools/src/py/qpid-tool4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/src/py/qpid-tool b/tools/src/py/qpid-tool
index c74595a359..e5affec74d 100755
--- a/tools/src/py/qpid-tool
+++ b/tools/src/py/qpid-tool
@@ -597,7 +597,6 @@ class IdRegistry(object):
def Usage():
print "Usage: qpid-tool [[<username>/<password>@]<target-host>[:<tcp-port>]]"
print
- sys.exit(1)
#=========================================================
# Main Program
@@ -612,6 +611,9 @@ if len(cargs) > 0:
if _host[0] == '-':
Usage()
+ if _host != '-h' and _host != "--help":
+ print "qpid-tool: error: no such option:", _host
+ sys.exit(1)
disp = Display()