diff src/plugins/plugin_xep_0077.py @ 916:1a759096ccbd

core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 16:27:09 +0100
parents 65bf1bc70f6b
children c6d8fc63b1db
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0077.py	Fri Mar 21 16:19:46 2014 +0100
+++ b/src/plugins/plugin_xep_0077.py	Fri Mar 21 16:27:09 2014 +0100
@@ -18,6 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from sat.core.i18n import _
+from sat.core.constants import Const as C
 from sat.core import exceptions
 from logging import debug, info, warning, error
 from twisted.words.protocols.jabber import jid
@@ -98,10 +99,10 @@
             raise exceptions.ConflictError( _("Username already exists, please choose an other one"))
         raise failure
 
-    def _inBandRegister(self, to_jid_s, profile_key='@NONE@'):
+    def _inBandRegister(self, to_jid_s, profile_key=C.PROF_KEY_NONE):
         return self.inBandRegister, jid.JID(to_jid_s, profile_key)
 
-    def inBandRegister(self, to_jid, post_treat_cb=None, profile_key='@NONE@'):
+    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: