diff options
| author | Alan Conway <aconway@apache.org> | 2012-11-09 22:32:19 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-11-09 22:32:19 +0000 |
| commit | 7a6ac448effd9361132747c8ddc5721315dd4dae (patch) | |
| tree | da285833542d583715fe1dea533c28986473502e | |
| parent | f56e93fa6ff8c628ebc45833dc9dc86739a6508c (diff) | |
| download | qpid-python-7a6ac448effd9361132747c8ddc5721315dd4dae.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/qpid@1407674 13f79535-47bb-0310-9956-ffa450edef68
| -rwxr-xr-x | tools/src/py/qpid-config | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/src/py/qpid-config b/tools/src/py/qpid-config index df43b7ea4e..3c5f1a1023 100755 --- a/tools/src/py/qpid-config +++ b/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: |
