qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1407674 - /qpid/trunk/qpid/tools/src/py/qpid-config
Date Fri, 09 Nov 2012 22:32:19 GMT
Author: aconway
Date: Fri Nov  9 22:32:19 2012
New Revision: 1407674

URL: http://svn.apache.org/viewvc?rev=1407674&view=rev
QPID-4410: Fix qpid-config argument parsing, broken by recent commit r1404836

Only the new --broker-addr option was working, the --broker option was being ignored.


Modified: qpid/trunk/qpid/tools/src/py/qpid-config
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-config?rev=1407674&r1=1407673&r2=1407674&view=diff
--- qpid/trunk/qpid/tools/src/py/qpid-config (original)
+++ qpid/trunk/qpid/tools/src/py/qpid-config Fri Nov  9 22:32:19 2012
@@ -174,7 +174,8 @@ def OptionsAndArguments(argv):
     group1 = OptionGroup(parser, "General Options")
     group1.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="<secs>",
help="Maximum time to wait for broker connection (in seconds)")
     group1.add_option("-r", "--recursive", action="store_true", help="Show bindings in queue
or exchange list")
-    group1.add_option("-b", "--broker", action="store", type="string", default="localhost:5672",
metavar="<address>", help="Address of qpidd broker with syntax: [username/password@]
hostname | ip-address [:<port>]")
+    group1.add_option("-b", "--broker", action="store", type="string", metavar="<address>",
help="Address of qpidd broker with syntax: [username/password@] hostname | ip-address [:<port>]")
+    group1.add_option("-a", "--broker-addr", action="store", type="string", metavar="<address>")
     group1.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>",
help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5,
GSSAPI). SASL automatically picks the most secure available mechanism - use this option to
     group1.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>",
help="Client SSL certificate (PEM Format)")
     group1.add_option("--ssl-key", action="store", type="string", metavar="<key>",
help="Client SSL private key (PEM Format)")
@@ -245,6 +246,9 @@ def OptionsAndArguments(argv):
         config._recursive = True
     if opts.broker:
         config._host = opts.broker
+    if opts.broker_addr:
+        config._host = opts.broker_addr
+    if config._host is None: config._host="localhost:5672"
     if opts.timeout is not None:
         config._connTimeout = opts.timeout
         if config._connTimeout == 0:

To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org

View raw message