diff src/plugins/plugin_xep_0077.py @ 941:c6d8fc63b1db

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
author Goffi <goffi@goffi.org>
date Fri, 28 Mar 2014 18:07:02 +0100
parents 1a759096ccbd
children 301b342c697a
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0077.py	Fri Mar 28 18:06:51 2014 +0100
+++ b/src/plugins/plugin_xep_0077.py	Fri Mar 28 18:07:02 2014 +0100
@@ -24,7 +24,6 @@
 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 @@
     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()