diff options
author | Nuno Santos <nsantos@apache.org> | 2010-05-24 23:19:11 +0000 |
---|---|---|
committer | Nuno Santos <nsantos@apache.org> | 2010-05-24 23:19:11 +0000 |
commit | 5e3d7c8162f1bbc7ba744ee779fa0a4339439438 (patch) | |
tree | bcaf9b380ad4c93c5c1af247c0cb491358760732 /tools/src/py/qpid-tool | |
parent | 7981b9d46fec43ff7b6969fca20c59d8c43b25eb (diff) | |
download | qpid-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-x | tools/src/py/qpid-tool | 4 |
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() |