mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
- Added a getTemplates() method because self.__templates can not be accessed directly anymore
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@371 a942ae1a-1317-0410-a47c-b1dcaea8d605
This commit is contained in:
parent
97a1e5b79f
commit
9f5f6812f5
2 changed files with 4 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ class Fail2banRegex:
|
|||
print "IP :" + ipList
|
||||
print
|
||||
print "Date template hits:"
|
||||
for template in self.__filter.dateDetector.templates:
|
||||
for template in self.__filter.dateDetector.getTemplates():
|
||||
print `template.getHits()` + " hit: " + template.getName()
|
||||
print
|
||||
print "Benchmark. Executing 1000..."
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ class DateDetector:
|
|||
template.setName("Epoch")
|
||||
self.__templates.append(template)
|
||||
|
||||
def getTemplates(self):
|
||||
return self.__templates
|
||||
|
||||
def setDefaultRegex(self, value):
|
||||
self.__defTemplate.setRegex(value)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue