core: fixed bad profile check in connect method
This commit is contained in:
parent
88ae55bdbd
commit
13ce598a50
1 changed files with 4 additions and 4 deletions
|
|
@ -448,7 +448,7 @@ class SAT(service.Service):
|
|||
"""Connect to jabber server"""
|
||||
|
||||
profile = self.memory.getProfileName(profile_key)
|
||||
if not profile_key:
|
||||
if not profile:
|
||||
error (_('Trying to connect a non-exsitant profile'))
|
||||
return
|
||||
|
||||
|
|
@ -456,9 +456,9 @@ class SAT(service.Service):
|
|||
info(_("already connected !"))
|
||||
return
|
||||
current = self.profiles[profile] = SatXMPPClient(self, profile,
|
||||
jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key = profile_key), profile),
|
||||
self.memory.getParamA("Password", "Connection", profile_key = profile_key),
|
||||
self.memory.getParamA("Server", "Connection", profile_key = profile_key), 5222)
|
||||
jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key = profile), profile),
|
||||
self.memory.getParamA("Password", "Connection", profile_key = profile),
|
||||
self.memory.getParamA("Server", "Connection", profile_key = profile), 5222)
|
||||
|
||||
current.messageProt = SatMessageProtocol(self)
|
||||
current.messageProt.setHandlerParent(current)
|
||||
|
|
|
|||
Loading…
Reference in a new issue