massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions
This commit is contained in:
parent
cc829beac7
commit
67ff77e5de
1 changed files with 272 additions and 271 deletions
|
|
@ -305,7 +305,7 @@ class SOCKSv5(protocol.Protocol, FileSender):
|
|||
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 @@ class SOCKSv5(protocol.Protocol, FileSender):
|
|||
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 @@ class Socks5ServerFactory(protocol.ServerFactory):
|
|||
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 @@ class Socks5ClientFactory(protocol.ClientFactory):
|
|||
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 @@ class XEP_0065(object):
|
|||
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 @@ class XEP_0065(object):
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue