Author: steve-e Date: 2009-01-11 18:10:41 +0100 (Sun, 11 Jan 2009) New Revision: 10970
Modified: trunk/src/common/xmpp/client_nb.py Log: Remove some (now) useless returns that where added because of a broken commit of mine...
Modified: trunk/src/common/xmpp/client_nb.py =================================================================== --- trunk/src/common/xmpp/client_nb.py 2009-01-11 15:12:28 UTC (rev 10969) +++ trunk/src/common/xmpp/client_nb.py 2009-01-11 17:10:41 UTC (rev 10970) @@ -356,12 +356,12 @@ if self.desired_security == 'plain': # if we want and have plain connection, we're done now self._on_connect() - return else: # try to negotiate TLS if self.incoming_stream_version() != '1.0': # if stream version is less than 1.0, we can't do more - log.warn('While connecting with type = "tls": stream version is less than 1.0') + log.warn('While connecting with type = "tls": stream version ' + + 'is less than 1.0') self._on_connect() if self.Dispatcher.Stream.features.getTag('starttls'): # Server advertises TLS support, start negotiation @@ -369,16 +369,14 @@ log.info('TLS supported by remote server. Requesting TLS start.') self._tls_negotiation_handler() else: - log.warn('While connecting with type = "tls": TLS unsupported by remote server') + log.warn('While connecting with type = "tls": TLS unsupported ' + + 'by remote server') self._on_connect() - return elif self.connected in ['ssl', 'tls']: self._on_connect() - return else: - log.error('Stream opened for unsupported connection: %s' % - (self.connected or 'Disconnected')) + assert False, 'Stream opened for unsupported connection'
def _tls_negotiation_handler(self, con=None, tag=None): ''' takes care of TLS negotioation with <starttls> '''