fix dups in find rast repeats
This commit is contained in:
parent
e7c7993b03
commit
f59b7ab639
@ -84,7 +84,10 @@ def find_fast_repeats(
|
||||
infos = sorted(infos, key=lambda info: info.datetime)
|
||||
for a, b in zip(infos, infos[1:]):
|
||||
if a.ip == b.ip and b.datetime - a.datetime <= threshold:
|
||||
result.setdefault(name, []).extend((a, b))
|
||||
for x in a, b:
|
||||
lst = result.setdefault(name, [])
|
||||
if x not in lst:
|
||||
lst.append(x)
|
||||
if name in result and len(result[name]) < min_repeats:
|
||||
result.pop(name)
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user