core: fixed bad profile check in connect method

This commit is contained in:
Goffi 2011-05-10 15:46:20 +02:00
commit 13ce598a50

View file

@ -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)