Author: tross
Date: Mon Jun 16 06:17:11 2008
New Revision: 668151

URL: http://svn.apache.org/viewvc?rev=668151&view=rev
Log:
Bugfix: usage line did not show with --help option

Modified:
    incubator/qpid/trunk/qpid/python/commands/qpid-tool

Modified: incubator/qpid/trunk/qpid/python/commands/qpid-tool
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/commands/qpid-tool?rev=668151&r1=668150&r2=668151&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/commands/qpid-tool (original)
+++ incubator/qpid/trunk/qpid/python/commands/qpid-tool Mon Jun 16 06:17:11 2008
@@ -140,7 +140,7 @@
     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 @@
 
 # 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


Reply via email to