connect always return a sequence

This commit is contained in:
Yann Leboulanger 2005-10-17 11:18:42 +00:00
parent 85cd5634ff
commit 4e7f9f5820
1 changed files with 3 additions and 3 deletions

View File

@ -1348,7 +1348,7 @@ class Connection:
use_custom_host, custom_host (if use_custom_host), custom_port (if use_custom_host, custom_host (if use_custom_host), custom_port (if
use_custom_host), """ use_custom_host), """
if self.connection: if self.connection:
return self.connection return self.connection, ''
if data: if data:
name = data['name'] name = data['name']
@ -1435,7 +1435,7 @@ class Connection:
con_type = con.connect((h, p), proxy = proxy, secure = secur) con_type = con.connect((h, p), proxy = proxy, secure = secur)
if not self.connected: # We went offline during connecting process if not self.connected: # We went offline during connecting process
return None return None, ''
if not con_type: if not con_type:
gajim.log.debug('Could not connect to %s' % h) gajim.log.debug('Could not connect to %s' % h)
if not self.retrycount: if not self.retrycount:
@ -1443,7 +1443,7 @@ class Connection:
self.dispatch('STATUS', 'offline') self.dispatch('STATUS', 'offline')
self.dispatch('ERROR', (_('Could not connect to "%s"') % h, self.dispatch('ERROR', (_('Could not connect to "%s"') % h,
_('Check your connection or try again later.'))) _('Check your connection or try again later.')))
return None return None, ''
gajim.log.debug(_('Connected to server with %s') % con_type) gajim.log.debug(_('Connected to server with %s') % con_type)
return con, con_type return con, con_type