mirror of https://github.com/fail2ban/fail2ban
fixed missing return value (attempts) in addFailure in case of observed/banned tickets (could cause error `'>=' not supported between instances of 'NoneType' and 'int'` with python 3.x, gh-2432)
parent
f48677db7d
commit
7c7dfab8db
|
@ -107,7 +107,7 @@ class FailManager:
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# not found - already banned - prevent to add failure if comes from observer:
|
# not found - already banned - prevent to add failure if comes from observer:
|
||||||
if observed or isinstance(ticket, BanTicket):
|
if observed or isinstance(ticket, BanTicket):
|
||||||
return
|
return ticket.getRetry()
|
||||||
# if already FailTicket - add it direct, otherwise create (using copy all ticket data):
|
# if already FailTicket - add it direct, otherwise create (using copy all ticket data):
|
||||||
if isinstance(ticket, FailTicket):
|
if isinstance(ticket, FailTicket):
|
||||||
fData = ticket;
|
fData = ticket;
|
||||||
|
|
Loading…
Reference in New Issue