fix traceback when trying to connect to a host for which auth method is not supported

This commit is contained in:
Yann Leboulanger 2011-12-17 15:17:25 +01:00
parent 78bd83766c
commit f8922005e0
1 changed files with 2 additions and 0 deletions

View File

@ -493,6 +493,8 @@ class NonBlockingClient:
if self._sasl:
auth_nb.SASL.get_instance(self._User, self._Password,
self._on_start_sasl).PlugIn(self)
if not hasattr(self, 'SASL'):
return
if not self._sasl or self.SASL.startsasl == 'not-supported':
if not self._Resource:
self._Resource = 'xmpppy'