summaryrefslogtreecommitdiff
path: root/qpid/python
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
commiteb065d21914a9047829887e629ec4b8cd9380c65 (patch)
tree32cdba6da79e2eae383a4f6071904ce21543bc75 /qpid/python
parentc929dbece35ec72da8e85c66ead28fa32e788ec4 (diff)
downloadqpid-python-eb065d21914a9047829887e629ec4b8cd9380c65.tar.gz
Bugfix: usage line did not show with --help option
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@668151 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rwxr-xr-xqpid/python/commands/qpid-tool8
1 files changed, 5 insertions, 3 deletions
diff --git a/qpid/python/commands/qpid-tool b/qpid/python/commands/qpid-tool
index bf16faac42..0ab47a01e7 100755
--- a/qpid/python/commands/qpid-tool
+++ b/qpid/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