summaryrefslogtreecommitdiff
path: root/python/qpid/sasl.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/qpid/sasl.py')
-rw-r--r--python/qpid/sasl.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/qpid/sasl.py b/python/qpid/sasl.py
index d4c15bd923..fed6deac20 100644
--- a/python/qpid/sasl.py
+++ b/python/qpid/sasl.py
@@ -89,6 +89,8 @@ class PlainClient:
return "PLAIN", "\0%s\0%s" % (self.attrs.get("username"), self.attrs.get("password"))
elif "ANONYMOUS" in mechs:
return "ANONYMOUS", "%s@%s" % (self.attrs.get("username"), socket.gethostname())
+ else:
+ raise SASLError("sasl negotiation failed: no mechanism agreed")
def step(self, challenge):
pass