fix attribute error
parent
58496cdb40
commit
82f8d5f4e2
|
@ -346,15 +346,16 @@ def main():
|
|||
return 1
|
||||
|
||||
if isinstance(config["domains"], list):
|
||||
domains = {domain.name: domain for domain in config["domains"]}
|
||||
domains = {domain["name"]: domain for domain in config["domains"]}
|
||||
if len(domains) != len(config["domains"]):
|
||||
domain_uniques = set()
|
||||
domain_duplicates = set()
|
||||
for domain in config["domains"]:
|
||||
if domain.name not in domain_uniques:
|
||||
domain_uniques.add(domain.name)
|
||||
domain_name = domain["name"]
|
||||
if domain_name not in domain_uniques:
|
||||
domain_uniques.add(domain_name)
|
||||
else:
|
||||
domain_duplicates.add(domain.name)
|
||||
domain_duplicates.add(domain_name)
|
||||
logging.error(f"Duplicate domain name(s) found: {domain_uniques}")
|
||||
return 2
|
||||
|
||||
|
|
Loading…
Reference in New Issue