mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-06-27 11:11:05 +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
379aa2f855
commit
bad9821b14
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…
Add table
Add a link
Reference in a new issue