Mercurial > libervia-backend
diff src/plugins/plugin_xep_0065.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 | 7cc29634b6ef |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0065.py Thu Apr 16 13:31:14 2015 +0200 +++ b/src/plugins/plugin_xep_0065.py Thu Apr 16 14:57:57 2015 +0200 @@ -305,7 +305,7 @@ return None def connectionMade(self): - log.debug("connectionMade (mode = %s)" % "requester" if isinstance(self.factory, Socks5ServerFactory) else "target") + log.debug(u"connectionMade (mode = %s)" % "requester" if isinstance(self.factory, Socks5ServerFactory) else "target") if isinstance(self.factory, Socks5ClientFactory): self.sid = self.factory.sid @@ -352,7 +352,8 @@ pass def authenticateUserPass(self, user, passwd): - log.debug("User/pass: %s/%s" % (user, passwd)) + # FIXME: implement authentication and remove the debug printing a password + log.debug(u"User/pass: %s/%s" % (user, passwd)) return True def dataReceived(self, buf): @@ -403,7 +404,7 @@ log.debug(_("Socks 5 server connection started")) def clientConnectionLost(self, connector, reason): - log.debug(_("Socks 5 server connection lost (reason: %s)") % reason) + log.debug(_(u"Socks 5 server connection lost (reason: %s)") % reason) class Socks5ClientFactory(protocol.ClientFactory): @@ -431,7 +432,7 @@ log.debug(_("Socks 5 client connection started")) def clientConnectionLost(self, connector, reason): - log.debug(_("Socks 5 client connection lost (reason: %s)") % reason) + log.debug(_(u"Socks 5 client connection lost (reason: %s)") % reason) self.finishedCb(self.sid, reason.type == error.ConnectionDone, self.profile) # TODO: really check if the state is actually successful @@ -684,7 +685,7 @@ streamhost_elts = filter(lambda elt: elt.name == 'streamhost', query_elt.elements()) if not sid in client.xep_0065_current_stream: - log.warning(_("Ignoring unexpected BS transfer: %s" % sid)) + log.warning(_(u"Ignoring unexpected BS transfer: %s" % sid)) self.sendNotAcceptableError(iq_elt['id'], iq_elt['from'], xmlstream) return @@ -693,7 +694,7 @@ client.xep_0065_current_stream[sid]["xmlstream"] = xmlstream if not streamhost_elts: - log.warning(_("No streamhost found in stream query %s" % sid)) + log.warning(_(u"No streamhost found in stream query %s" % sid)) self.sendBadRequestError(iq_elt['id'], iq_elt['from'], xmlstream) return