comparison src/plugins/plugin_misc_account.py @ 1409:3265a2639182

massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions
author souliane <souliane@mailoo.org>
date Thu, 16 Apr 2015 14:57:57 +0200
parents 069ad98b360d
children 5d42e2219d7c
comparison
equal deleted inserted replaced
1408:8a7145138330 1409:3265a2639182
129 host.bridge.addMethod("getAccountDialogUI", ".plugin", in_sign='s', out_sign='s', method=self._getAccountDialogUI, async=False) 129 host.bridge.addMethod("getAccountDialogUI", ".plugin", in_sign='s', out_sign='s', method=self._getAccountDialogUI, async=False)
130 self._prosody_path = self.getConfig('prosody_path') 130 self._prosody_path = self.getConfig('prosody_path')
131 if self._prosody_path is None: 131 if self._prosody_path is None:
132 paths = which(self.getConfig('prosodyctl')) 132 paths = which(self.getConfig('prosodyctl'))
133 if not paths: 133 if not paths:
134 log.error(_("Can't find %s") % (self.getConfig('prosodyctl'), )) 134 log.error(_(u"Can't find %s") % (self.getConfig('prosodyctl'),))
135 else: 135 else:
136 self._prosody_path = dirname(paths[0]) 136 self._prosody_path = dirname(paths[0])
137 log.info(_('Prosody path found: %s') % (self._prosody_path, )) 137 log.info(_(u'Prosody path found: %s') % (self._prosody_path,))
138 138
139 self._sessions = Sessions() 139 self._sessions = Sessions()
140 140
141 self.__account_cb_id = host.registerCallback(self._accountDialogCb, with_data=True) 141 self.__account_cb_id = host.registerCallback(self._accountDialogCb, with_data=True)
142 self.__change_password_id = host.registerCallback(self.__changePasswordCb, with_data=True) 142 self.__change_password_id = host.registerCallback(self.__changePasswordCb, with_data=True)
211 def email_ok(ignore): 211 def email_ok(ignore):
212 print ("Account creation email sent to %s" % email) 212 print ("Account creation email sent to %s" % email)
213 213
214 def email_ko(ignore): 214 def email_ko(ignore):
215 #TODO: return error code to user 215 #TODO: return error code to user
216 log.error("Failed to send email to %s" % email) 216 log.error(u"Failed to send email to %s" % email)
217 217
218 body = (u"""Welcome to Libervia, a Salut à Toi project part 218 body = (u"""Welcome to Libervia, a Salut à Toi project part
219 219
220 /!\\ WARNING, THIS IS ONLY A TECHNICAL DEMO, DON'T USE THIS ACCOUNT FOR ANY SERIOUS PURPOSE /!\\ 220 /!\\ WARNING, THIS IS ONLY A TECHNICAL DEMO, DON'T USE THIS ACCOUNT FOR ANY SERIOUS PURPOSE /!\\
221 221