From f59b7ab63935d191e7210c7d50fc2a3e3adb0b92 Mon Sep 17 00:00:00 2001
From: Dmitry <b4tm4n@mail.ru>
Date: Thu, 13 Mar 2025 11:52:20 +0300
Subject: [PATCH] fix dups in find rast repeats

---
 finddups.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/finddups.py b/finddups.py
index 7e06d74..73f3d11 100644
--- a/finddups.py
+++ b/finddups.py
@@ -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