Make IPs list unique

Signed-off-by: Arash Hatami <hatamiarash7@gmail.com>
This commit is contained in:
Arash Hatami 2022-10-20 17:29:51 +03:30
parent 6374562c2e
commit d58dda53f6
No known key found for this signature in database
GPG Key ID: D3D9E8CB2E49731F
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ with open(file='ip-list.json', mode='r', encoding='UTF-8') as file:
for ip in lists[group]:
IPS.append(ip)
# Make IPs list unique
IPS = list(set(IPS))
# Put all IPs in a string
IPS = ", ".join(map(str, IPS))
# Load other config options from .env file