PROTON-334: change container in line with recent sasl api changes
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/059113ae Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/059113ae Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/059113ae Branch: refs/heads/rajith-codec Commit: 059113ae3872ad1d990867236c4d1446fbaf693e Parents: e65496a Author: Gordon Sim <[email protected]> Authored: Wed May 6 22:00:30 2015 +0100 Committer: Gordon Sim <[email protected]> Committed: Wed May 6 22:31:31 2015 +0100 ---------------------------------------------------------------------- proton-c/bindings/python/proton/reactor.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/059113ae/proton-c/bindings/python/proton/reactor.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/proton/reactor.py b/proton-c/bindings/python/proton/reactor.py index 467bb76..09cbc23 100644 --- a/proton-c/bindings/python/proton/reactor.py +++ b/proton-c/bindings/python/proton/reactor.py @@ -484,6 +484,10 @@ class Connector(Handler): connection.hostname = "%s:%i" % (url.host, url.port) logging.info("connecting to %s..." % connection.hostname) + if url.username: + connection.user = url.username + if url.password: + connection.password = url.password transport = Transport() transport.bind(connection) if self.heartbeat: @@ -491,12 +495,6 @@ class Connector(Handler): if url.scheme == 'amqps' and self.ssl_domain: self.ssl = SSL(transport, self.ssl_domain) self.ssl.peer_hostname = url.host - if url.username: - sasl = transport.sasl() - if url.username == 'anonymous': - sasl.mechanisms('ANONYMOUS') - else: - sasl.plain(url.username, url.password) def on_connection_local_open(self, event): self._connect(event.connection) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
