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