mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
- Increment counter internally.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@637 a942ae1a-1317-0410-a47c-b1dcaea8d605
This commit is contained in:
parent
a2e8eb9c82
commit
85dcd049f5
1 changed files with 2 additions and 3 deletions
|
|
@ -60,14 +60,13 @@ class DateTemplate:
|
|||
def isValid(self):
|
||||
return self.__regex != "" and self.__pattern != ""
|
||||
|
||||
def incHits(self):
|
||||
self.__hits = self.__hits + 1
|
||||
|
||||
def getHits(self):
|
||||
return self.__hits
|
||||
|
||||
def matchDate(self, line):
|
||||
dateMatch = self.__cRegex.search(line)
|
||||
if not dateMatch == None:
|
||||
self.__hits += 1
|
||||
return dateMatch
|
||||
|
||||
def getDate(self, line):
|
||||
|
|
|
|||
Loading…
Reference in a new issue