mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
BF: Ticket compared to non-Ticket type returns False
This commit is contained in:
parent
5d2a03e852
commit
1990eeae64
1 changed files with 4 additions and 1 deletions
|
|
@ -53,10 +53,13 @@ class Ticket:
|
|||
return str(self)
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.__ip == other.__ip and \
|
||||
try:
|
||||
return self.__ip == other.__ip and \
|
||||
round(self.__time,2) == round(other.__time,2) and \
|
||||
self.__attempt == other.__attempt and \
|
||||
self.__matches == other.__matches
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
def setIP(self, value):
|
||||
if isinstance(value, basestring):
|
||||
|
|
|
|||
Loading…
Reference in a new issue