From 2f3728486373e4dd0045776af359d663e4f84b70 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Thu, 19 Oct 2006 21:49:16 +0000 Subject: [PATCH] - Removed useless code git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@423 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- server/filter.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/filter.py b/server/filter.py index 1b29510d..44813721 100644 --- a/server/filter.py +++ b/server/filter.py @@ -30,7 +30,7 @@ from jailthread import JailThread from datedetector import DateDetector from mytime import MyTime -import time, logging, re +import logging, re # Gets the instance of the logger. logSys = logging.getLogger("fail2ban.filter") @@ -356,13 +356,10 @@ class Filter(JailThread): lastLine = None for line in self.__crtHandler: try: - # Try to convert UTF-8 string to Latin-1 - #line = line.decode('utf-8').encode('latin-1') + # Decode line to UTF-8 line = line.decode('utf-8') except UnicodeDecodeError: pass - #except UnicodeEncodeError: - # logSys.warn("Mmhh... Are you sure you watch the correct file?") if not self.dateDetector.matchTime(line): # There is no valid time in this line continue