Skip to content

Commit

Permalink
Add loop for email input
Browse files Browse the repository at this point in the history
Signed-off-by: Eli Engelhardt <[email protected]>
  • Loading branch information
eli-engelhardt authored and amstewart committed Feb 14, 2025
1 parent 8a82790 commit 464b2a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nilrt_snac/_configs/_auditd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def configure(self, args: argparse.Namespace) -> None:
if not audit_email:
audit_email = auditd_config_file.get("action_mail_acct")
if not is_valid_email(audit_email) and not unattended_bypass:
audit_email = input("Please enter your audit email address: ")
while not audit_email.strip() or not is_valid_email(audit_email):
audit_email = input("Please enter your audit email address: ")
else:
# Use local default e-mail
audit_email = f"root@{socket.gethostname()}"
Expand Down

0 comments on commit 464b2a2

Please sign in to comment.