Skip to content
Snippets Groups Projects
Commit 52b07408 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

no need for connect() to return the con_type

parent b4c4d2b2
No related branches found
No related tags found
No related merge requests found
......@@ -665,7 +665,7 @@ class Connection:
self.dispatch('STATUS', 'offline')
self.dispatch('ERROR', (_('Could not connect to "%s"') % self.name,
_('Check your connection or try again later')))
return None, None
return None
gajim.log.debug('Connected to server with %s', con_type)
......@@ -709,11 +709,11 @@ class Connection:
self.dispatch('STATUS', 'offline')
self.dispatch('ERROR', (_('Could not connect to "%s"') % self.name,
_('Check your connection or try again later')))
return None, None
return None
if auth:
con.initRoster()
self.connected = 2
return con, con_type # return connection and connection type
return con # return connection
else:
gajim.log.debug("Couldn't authenticate to %s" % self.name)
self.connected = 0
......@@ -721,7 +721,7 @@ class Connection:
self.dispatch('ERROR', (_('Authentication failed with "%s"') % \
self.name,
_('Please check your login and password for correctness.')))
return None, None
return None
# END connect
def register_handler(self, event, function):
......@@ -777,7 +777,7 @@ class Connection:
self.dispatch('BAD_PASSPHRASE', ())
self.status = msg
if show != 'offline' and not self.connected:
self.connection, self.con_type = self.connect()
self.connection = self.connect()
if self.connected == 2:
self.connected = STATUS_LIST.index(show)
#send our presence
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment