From 8e8c80d980c8d0489bed7ee6f07ac40551ecc547 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 10 Jan 2014 09:44:30 +1100 Subject: [PATCH] ENH: dont run samples on filter filenames beginning with . --- fail2ban/tests/samplestestcase.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fail2ban/tests/samplestestcase.py b/fail2ban/tests/samplestestcase.py index 0a88af2a..b185da19 100644 --- a/fail2ban/tests/samplestestcase.py +++ b/fail2ban/tests/samplestestcase.py @@ -151,7 +151,8 @@ def testSampleRegexsFactory(name): for filter_ in filter(lambda x: not x.endswith('common.conf'), os.listdir(os.path.join(CONFIG_DIR, "filter.d"))): filterName = filter_.rpartition(".")[0] - setattr( - FilterSamplesRegex, - "testSampleRegexs%s" % filterName.upper(), - testSampleRegexsFactory(filterName)) + if not filterName.startswith('.'): + setattr( + FilterSamplesRegex, + "testSampleRegexs%s" % filterName.upper(), + testSampleRegexsFactory(filterName))