Skip to content

Commit

Permalink
Fix undefined results_list in case GET_SEC_TXT = false
Browse files Browse the repository at this point in the history
  • Loading branch information
oh2fih committed Jul 17, 2024
1 parent 7194fe6 commit 5761a96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def genStaticFiles(results: dict):
genSecurityTxtForDomain((0, domain), gen_sites)
else:
domains_dict = {}
results_list = []

if os.environ.get("GET_SEC_TXT", "false") == "true":
sites = Sites()
Expand All @@ -184,7 +185,6 @@ def genStaticFiles(results: dict):
else:
raise Exception("No domains")

results_list = []
with Pool(int(os.environ.get("POOL_SIZE", os.cpu_count()))) as p:
results_list = p.map(genSecurityTxtForDomain, domains_dict.items())

Expand Down

0 comments on commit 5761a96

Please sign in to comment.