Merge pull request #763 from Sean-Der/round-banip-time

BF: Round timeofban before inserting into the persistant database
pull/769/head
Steven Hiscocks 2014-07-19 14:56:32 +01:00
commit 8e0a59f04d
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ class Fail2BanDb(object):
#TODO: Implement data parts once arbitrary match keys completed #TODO: Implement data parts once arbitrary match keys completed
cur.execute( cur.execute(
"INSERT INTO bans(jail, ip, timeofban, data) VALUES(?, ?, ?, ?)", "INSERT INTO bans(jail, ip, timeofban, data) VALUES(?, ?, ?, ?)",
(jail.name, ticket.getIP(), ticket.getTime(), (jail.name, ticket.getIP(), round(ticket.getTime()),
{"matches": ticket.getMatches(), {"matches": ticket.getMatches(),
"failures": ticket.getAttempt()})) "failures": ticket.getAttempt()}))