mirror of https://github.com/fail2ban/fail2ban
BF: in code we should use MyTime wrapper instead of time module directly
to allow for some tests to work correctlypull/64/merge
parent
09355663f7
commit
8e64c281dd
|
@ -220,7 +220,7 @@ class Filter(JailThread):
|
||||||
# to enable banip fail2ban-client BAN command
|
# to enable banip fail2ban-client BAN command
|
||||||
|
|
||||||
def addBannedIP(self, ip):
|
def addBannedIP(self, ip):
|
||||||
unixTime = time.time()
|
unixTime = MyTime.time()
|
||||||
for i in xrange(self.failManager.getMaxRetry()):
|
for i in xrange(self.failManager.getMaxRetry()):
|
||||||
self.failManager.addFailure(FailTicket(ip, unixTime))
|
self.failManager.addFailure(FailTicket(ip, unixTime))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue