contrib: makeseeds: dedup by ip,port

Handle the multiple ports per IP case (as that's a criterion later).
This commit is contained in:
Wladimir J. van der Laan 2019-10-01 11:22:21 +02:00
parent 3314d87966
commit c254a9ef69

View file

@ -108,10 +108,10 @@ def parseline(line):
}
def dedup(ips):
'''deduplicate by address'''
'''deduplicate by address,port'''
d = {}
for ip in ips:
d[ip['ip']] = ip
d[ip['ip'],ip['port']] = ip
return list(d.values())
def filtermultiport(ips):