From ed16ecc50abba6ddbe9be577fe0dd983f1795b80 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 25 Jan 2012 19:22:16 -0500 Subject: [PATCH] Enforce "ip" field returned as str, not unicode so that log message stays non-unicode Should address #32 --- server/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/actions.py b/server/actions.py index e8c7cdda..f936de18 100644 --- a/server/actions.py +++ b/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 ##