mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
python3/pypy compatibility fix
This commit is contained in:
parent
0dce32405f
commit
96de888ac7
1 changed files with 2 additions and 2 deletions
|
|
@ -717,7 +717,7 @@ class FileFilter(Filter):
|
|||
lasti = 0
|
||||
movecntr = 3
|
||||
while maxp > minp:
|
||||
i = round(minp + (maxp - minp) / 2)
|
||||
i = int(minp + (maxp - minp) / 2)
|
||||
pos = container.seek(i)
|
||||
cntr += 1
|
||||
# within next 5 lines try to find any legal datetime:
|
||||
|
|
@ -748,7 +748,7 @@ class FileFilter(Filter):
|
|||
if not dateTimeMatch:
|
||||
break
|
||||
unixTime = dateTimeMatch[0]
|
||||
if round(unixTime) == round(date):
|
||||
if int(unixTime) == int(date):
|
||||
break
|
||||
if unixTime >= date:
|
||||
maxp = i
|
||||
|
|
|
|||
Loading…
Reference in a new issue