Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0249.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 | d17772b0fe22 |
comparison
equal
deleted
inserted
replaced
1408:8a7145138330 | 1409:3265a2639182 |
---|---|
127 """ | 127 """ |
128 profile = self.host.memory.getProfileName(profile_key) | 128 profile = self.host.memory.getProfileName(profile_key) |
129 if not profile: | 129 if not profile: |
130 log.error(_("Profile doesn't exists !")) | 130 log.error(_("Profile doesn't exists !")) |
131 return | 131 return |
132 log.info(_('Invitation accepted for room %(room)s [%(profile)s]') % {'room': room_jid.userhost(), 'profile': profile}) | 132 log.info(_(u'Invitation accepted for room %(room)s [%(profile)s]') % {'room': room_jid.userhost(), 'profile': profile}) |
133 _jid, xmlstream = self.host.getJidNStream(profile) | 133 _jid, xmlstream = self.host.getJidNStream(profile) |
134 d = self.host.plugins["XEP-0045"].join(room_jid, _jid.user, {}, profile) | 134 d = self.host.plugins["XEP-0045"].join(room_jid, _jid.user, {}, profile) |
135 return d | 135 return d |
136 | 136 |
137 def onInvitation(self, message, profile): | 137 def onInvitation(self, message, profile): |
140 @param message: message element | 140 @param message: message element |
141 @profile: %(doc_profile)s | 141 @profile: %(doc_profile)s |
142 """ | 142 """ |
143 try: | 143 try: |
144 room_jid_s = message.firstChildElement()['jid'] | 144 room_jid_s = message.firstChildElement()['jid'] |
145 log.info(_('Invitation received for room %(room)s [%(profile)s]') % {'room': room_jid_s, 'profile': profile}) | 145 log.info(_(u'Invitation received for room %(room)s [%(profile)s]') % {'room': room_jid_s, 'profile': profile}) |
146 except: | 146 except: |
147 log.error(_('Error while parsing invitation')) | 147 log.error(_('Error while parsing invitation')) |
148 return | 148 return |
149 from_jid_s = message["from"] | 149 from_jid_s = message["from"] |
150 room_jid = jid.JID(room_jid_s) | 150 room_jid = jid.JID(room_jid_s) |