mirror of https://github.com/fail2ban/fail2ban
Merge pull request #575 from grooverdan/no-dot-filters
ENH: dont run samples on filter filenames beginning with .pull/579/head
commit
62cfad3c2d
|
@ -151,6 +151,7 @@ def testSampleRegexsFactory(name):
|
||||||
|
|
||||||
for filter_ in filter(lambda x: not x.endswith('common.conf'), os.listdir(os.path.join(CONFIG_DIR, "filter.d"))):
|
for filter_ in filter(lambda x: not x.endswith('common.conf'), os.listdir(os.path.join(CONFIG_DIR, "filter.d"))):
|
||||||
filterName = filter_.rpartition(".")[0]
|
filterName = filter_.rpartition(".")[0]
|
||||||
|
if not filterName.startswith('.'):
|
||||||
setattr(
|
setattr(
|
||||||
FilterSamplesRegex,
|
FilterSamplesRegex,
|
||||||
"testSampleRegexs%s" % filterName.upper(),
|
"testSampleRegexs%s" % filterName.upper(),
|
||||||
|
|
Loading…
Reference in New Issue