BF: fail2ban-regex when using ignoreregex file with empty regex

pull/275/merge
Steven Hiscocks 2013-06-29 19:17:22 +01:00
parent 0fe93cf992
commit ec0680d73a
1 changed files with 4 additions and 2 deletions

View File

@ -183,8 +183,10 @@ class Fail2banRegex(object):
reader.read(value)
print "Use %11s file : %s" % (regex, value)
# TODO: reuse functionality in client
regex_values = [RegexStat(m)
for m in reader.get("Definition", regex).split('\n')]
regex_values = [
RegexStat(m)
for m in reader.get("Definition", regex).split('\n')
if m != ""]
except NoSectionError:
print "No [Definition] section in %s" % value
return False