qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [1/2] qpid-proton git commit: PROTON-950: don't force sasl layer by default
Date Wed, 19 Aug 2015 18:57:19 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 1888a59c6 -> 4e878602d


PROTON-950: don't force sasl layer by default


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/14956b07
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/14956b07
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/14956b07

Branch: refs/heads/master
Commit: 14956b07edc3de93f67179c753bbedcd9eba51a6
Parents: 1888a59
Author: Gordon Sim <gsim@redhat.com>
Authored: Wed Aug 19 16:18:47 2015 +0100
Committer: Gordon Sim <gsim@redhat.com>
Committed: Wed Aug 19 16:19:00 2015 +0100

----------------------------------------------------------------------
 proton-c/bindings/python/proton/reactor.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/14956b07/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 dce1e08..8de5d89 100644
--- a/proton-c/bindings/python/proton/reactor.py
+++ b/proton-c/bindings/python/proton/reactor.py
@@ -504,14 +504,17 @@ class Connector(Handler):
         connection.hostname = "%s:%s" % (url.host, url.port)
         logging.info("connecting to %s..." % connection.hostname)
 
+        transport = Transport()
+        sasl = None
         if url.username:
             connection.user = url.username
+            sasl = transport.sasl()
+            sasl.allow_insecure_mechs = self.allow_insecure_mechs
         if url.password:
             connection.password = url.password
-        transport = Transport()
-        sasl = transport.sasl()
-        sasl.allow_insecure_mechs = self.allow_insecure_mechs
         if self.allowed_mechs:
+            if sasl == None:
+                sasl = transport.sasl()
             sasl.allowed_mechs(self.allowed_mechs)
         transport.bind(connection)
         if self.heartbeat:


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


Mime
View raw message