summaryrefslogtreecommitdiff
path: root/qpid
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-11-09 22:32:19 +0000
committerAlan Conway <aconway@apache.org>2012-11-09 22:32:19 +0000
commitbf0d1076789644dc11ff5be6ca8a3db4fd2049d8 (patch)
treea69974d8a77eee0b54d8053766ce344681a6b5f0 /qpid
parent8ff1f8c1a0eb2cee06402544f6ccac6e57b1bcd2 (diff)
downloadqpid-python-bf0d1076789644dc11ff5be6ca8a3db4fd2049d8.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1407674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
-rwxr-xr-xqpid/tools/src/py/qpid-config6
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/tools/src/py/qpid-config b/qpid/tools/src/py/qpid-config
index df43b7ea4e..3c5f1a1023 100755
--- a/qpid/tools/src/py/qpid-config
+++ b/qpid/tools/src/py/qpid-config
@@ -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 override.")
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: