- 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
0.x
Cyril Jaquier 2006-09-19 22:21:20 +00:00
parent 97a1e5b79f
commit 9f5f6812f5
2 changed files with 4 additions and 1 deletions

View File

@ -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..."

View File

@ -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)