mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
filter reader stream: don't need to generate None values from filter config
This commit is contained in:
parent
b83712e3ec
commit
c6e93db278
1 changed files with 2 additions and 3 deletions
|
|
@ -72,8 +72,9 @@ class FilterReader(DefinitionInitConfigReader):
|
|||
def _fillStream(stream, opts, jailName):
|
||||
prio0idx = 0
|
||||
for opt, value in opts.iteritems():
|
||||
# Do not send a command if the value is not set (empty).
|
||||
if value is None: continue
|
||||
if opt in ("failregex", "ignoreregex"):
|
||||
if value is None: continue
|
||||
multi = []
|
||||
for regex in value.split('\n'):
|
||||
# Do not send a command if the rule is empty.
|
||||
|
|
@ -91,8 +92,6 @@ class FilterReader(DefinitionInitConfigReader):
|
|||
elif opt in ('datepattern'):
|
||||
stream.append(["set", jailName, opt, value])
|
||||
elif opt == 'journalmatch':
|
||||
# Do not send a command if the match is empty.
|
||||
if value is None: continue
|
||||
for match in value.split("\n"):
|
||||
if match == '': continue
|
||||
stream.append(
|
||||
|
|
|
|||
Loading…
Reference in a new issue