core, plugins: host.getClient now raise an exception instead of returning None when no profile is found, plugins have been adapted consequently and a bit cleaned
This commit is contained in:
parent
ed9df2984d
commit
a6897c76e0
1 changed files with 25 additions and 140 deletions
|
|
@ -24,7 +24,6 @@ from logging import debug, info, warning, error
|
|||
from twisted.words.protocols.jabber import jid
|
||||
from twisted.words.protocols.jabber.xmlstream import IQ
|
||||
from sat.tools import xml_tools
|
||||
from sat.memory import memory
|
||||
|
||||
from wokkel import data_form, compat
|
||||
|
||||
|
|
@ -105,8 +104,6 @@ class XEP_0077(object):
|
|||
def inBandRegister(self, to_jid, post_treat_cb=None, profile_key=C.PROF_KEY_NONE):
|
||||
"""register to a target JID"""
|
||||
client = self.host.getClient(profile_key)
|
||||
if not client:
|
||||
raise exceptions.ProfileUnknownError
|
||||
debug(_("Asking registration for [%s]") % to_jid.full())
|
||||
reg_request = IQ(client.xmlstream, 'get')
|
||||
reg_request["from"] = client.jid.full()
|
||||
|
|
|
|||
Loading…
Reference in a new issue