mirror of https://github.com/fail2ban/fail2ban
- 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-b1dcaea8d6050.x
parent
97a1e5b79f
commit
9f5f6812f5
|
@ -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 New Issue