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 | ea8f03207a561361c7bf398c9a747b56eeedee28 (patch) | |
| tree | 6edc28bf64067939158b2a42f294c1a9a64543d2 /qpid/tools/src/py/qpid-tool | |
| parent | aa1ddcebf5a63c4908b08035b223b1ec1fa54037 (diff) | |
| download | qpid-python-ea8f03207a561361c7bf398c9a747b56eeedee28.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@947858 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tools/src/py/qpid-tool')
| -rwxr-xr-x | qpid/tools/src/py/qpid-tool | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/tools/src/py/qpid-tool b/qpid/tools/src/py/qpid-tool index c74595a359..e5affec74d 100755 --- a/qpid/tools/src/py/qpid-tool +++ b/qpid/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() |
