comparison src/plugins/plugin_xep_0050.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 74ddb4cc2ff9
comparison
equal deleted inserted replaced
1408:8a7145138330 1409:3265a2639182
105 allowed = set(self.allowed_jids) 105 allowed = set(self.allowed_jids)
106 for group in self.allowed_groups: 106 for group in self.allowed_groups:
107 try: 107 try:
108 allowed.update(self.client.roster.getJidsFromGroup(group)) 108 allowed.update(self.client.roster.getJidsFromGroup(group))
109 except exceptions.UnknownGroupError: 109 except exceptions.UnknownGroupError:
110 log.warning(_("The groups [%(group)s] is unknown for profile [%(profile)s])" % {'group':group, 'profile':self.client.profile})) 110 log.warning(_(u"The groups [%(group)s] is unknown for profile [%(profile)s])" % {'group':group, 'profile':self.client.profile}))
111 if requestor.userhostJID() in allowed: 111 if requestor.userhostJID() in allowed:
112 return True 112 return True
113 return False 113 return False
114 114
115 def getDiscoInfo(self, requestor, target, nodeIdentifier=''): 115 def getDiscoInfo(self, requestor, target, nodeIdentifier=''):
252 return C.XMLUI_DATA_LVL_ERROR 252 return C.XMLUI_DATA_LVL_ERROR
253 elif type_ == 'warn': 253 elif type_ == 'warn':
254 return C.XMLUI_DATA_LVL_WARNING 254 return C.XMLUI_DATA_LVL_WARNING
255 else: 255 else:
256 if type_ != 'info': 256 if type_ != 'info':
257 log.warning(_("Invalid note type [%s], using info") % type_) 257 log.warning(_(u"Invalid note type [%s], using info") % type_)
258 return C.XMLUI_DATA_LVL_INFO 258 return C.XMLUI_DATA_LVL_INFO
259 259
260 def _mergeNotes(self, notes): 260 def _mergeNotes(self, notes):
261 """Merge notes with level prefix (e.g. "ERROR: the message") 261 """Merge notes with level prefix (e.g. "ERROR: the message")
262 262