Browse Source

Enforce "ip" field returned as str, not unicode so that log message stays non-unicode

Should address #32
pull/27/merge
Yaroslav Halchenko 13 years ago
parent
commit
ed16ecc50a
  1. 4
      server/actions.py

4
server/actions.py

@ -163,13 +163,13 @@ class Actions(JailThread):
aInfo["time"] = bTicket.getTime()
aInfo["matches"] = "".join(bTicket.getMatches())
if self.__banManager.addBanTicket(bTicket):
logSys.warn("[%s] Ban %s" % (self.jail.getName(), aInfo["ip"]))
logSys.warn("[%s] Ban %s" % (self.jail.getName(), str(aInfo["ip"])))
for action in self.__actions:
action.execActionBan(aInfo)
return True
else:
logSys.warn("[%s] %s already banned" % (self.jail.getName(),
aInfo["ip"]))
str(aInfo["ip"])))
return False
##

Loading…
Cancel
Save