Browse Source

- 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 18 years ago
parent
commit
9f5f6812f5
  1. 2
      fail2ban-regex
  2. 3
      server/datedetector.py

2
fail2ban-regex

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

3
server/datedetector.py

@ -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…
Cancel
Save