You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by pm...@apache.org on 2014/07/01 16:09:06 UTC
svn commit: r1607086 - /qpid/trunk/qpid/python/qpid/messaging/driver.py
Author: pmoravec
Date: Tue Jul 1 14:09:05 2014
New Revision: 1607086
URL: http://svn.apache.org/r1607086
Log:
[QPID-5864]: [Python client] Provide better error description when SASL required but no credentials provided
Modified:
qpid/trunk/qpid/python/qpid/messaging/driver.py
Modified: qpid/trunk/qpid/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/driver.py?rev=1607086&r1=1607085&r2=1607086&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/driver.py Tue Jul 1 14:09:05 2014
@@ -723,7 +723,11 @@ class Engine:
try:
mech, initial = self._sasl.start(" ".join(mechs))
except sasl.SASLError, e:
- raise AuthenticationFailure(text=str(e))
+ if "ANONYMOUS" not in mechs and self.connection.username is None:
+ _text="Anonymous connections disabled, missing credentials"
+ else:
+ _text=str(e)
+ raise AuthenticationFailure(text=_text)
client_properties = get_client_properties_with_defaults(provided_client_properties=self.connection.client_properties);
self.write_op(ConnectionStartOk(client_properties=client_properties,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org