This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 5c8850f Fix an error in a condition to validate outgoing email
5c8850f is described below
commit 5c8850fc0f2e62300a7ce06af926fecb448b81cc
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Nov 14 20:40:10 2025 +0000
Fix an error in a condition to validate outgoing email
---
atr/mail.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/atr/mail.py b/atr/mail.py
index 1ead3f0..f0cfa83 100644
--- a/atr/mail.py
+++ b/atr/mail.py
@@ -147,7 +147,7 @@ def _validate_recipient(to_addr: str) -> None:
_, domain = _split_address(to_addr)
domain_is_apache = domain == "apache.org"
domain_is_subdomain = domain.endswith(".apache.org")
- if not domain_is_apache or domain_is_subdomain:
+ if not (domain_is_apache or domain_is_subdomain):
error_msg = f"Email recipient must be @apache.org or @*.apache.org,
got {to_addr}"
log.error(error_msg)
raise ValueError(error_msg)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]