summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-06-16 13:17:11 +0000
committerTed Ross <tross@apache.org>2008-06-16 13:17:11 +0000
commit17ccdfbcefea0bb3c18efef29f794ec57d26709a (patch)
treec276a75c3085d30b169b0f6618c6ad7ecabb4a04
parent28a7fd34ef9fc43a1a2d44c0cb383535eea17ab7 (diff)
downloadqpid-python-17ccdfbcefea0bb3c18efef29f794ec57d26709a.tar.gz
Bugfix: usage line did not show with --help option
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@668151 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xpython/commands/qpid-tool8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/commands/qpid-tool b/python/commands/qpid-tool
index bf16faac42..0ab47a01e7 100755
--- a/python/commands/qpid-tool
+++ b/python/commands/qpid-tool
@@ -140,7 +140,7 @@ class Mcli (Cmd):
self.dataObject.close ()
def Usage ():
- print "Usage:", sys.argv[0], "[OPTIONS] [<target-host[:<tcp-port>]]"
+ print "Usage: qpid-tool [<target-host[:<tcp-port>]]"
print
sys.exit (1)
@@ -150,12 +150,14 @@ def Usage ():
# Get host name and port if specified on the command line
cargs = sys.argv[1:]
-
-_host = "localhost"
+_host = "localhost"
if len (cargs) > 0:
_host = cargs[0]
+if _host[0] == '-':
+ Usage()
+
disp = Display ()
# Attempt to make a connection to the target broker