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

Should address #32
pull/27/merge
Yaroslav Halchenko 2012-01-25 19:22:16 -05:00
parent d73a71f5cf
commit ed16ecc50a
1 changed files with 2 additions and 2 deletions

View File

@ -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
##