Skip to content
Snippets Groups Projects
Commit 766f796e authored by Thomas Schneider's avatar Thomas Schneider
Browse files

Write output to configured file

parent 9a20b700
No related branches found
No related tags found
No related merge requests found
Pipeline #3884 passed
......@@ -35,9 +35,8 @@ def main():
output[d] = {a for a in addresses if a.domain is None or a.domain == d}
for k, v in output.items():
print(f"{k}:")
for a in v:
print(f" {a.localpart}")
with open(config["output"].format(domain=k), "w") as f:
f.write("\n".join(map(lambda a: a.localpart, v)))
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment