From 97c7d391a48522e9dccaabd74f920944cd4fb169 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sat, 18 Jan 2014 23:52:20 +1100 Subject: [PATCH] BF: remove duplicate implemenation of reading datepatterns in fail2ban-regex --- bin/fail2ban-regex | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bin/fail2ban-regex b/bin/fail2ban-regex index d470be9c..cfaa4a89 100755 --- a/bin/fail2ban-regex +++ b/bin/fail2ban-regex @@ -284,15 +284,8 @@ class Fail2banRegex(object): datepattern = command[3] self.setDatePattern(datepattern) else: - self.setJournalMatch(shlex.split(journalmatch)) - # Read out and set possible value for journalmatch - try: - datepattern = reader.get("Init", "datepattern") - except (NoSectionError, NoOptionError): - # No [Init].datepattern found. - pass - else: - self.setDatePattern(datepattern) + print "ERROR: failed to read %s" % value + return False else: print "Use %11s line : %s" % (regex, shortstr(value)) regex_values = [RegexStat(value)]