bodhi/config/app.cfg | 3 +++
bodhi/mail.py | 2 ++
2 files changed, 5 insertions(+)
New commits:
commit e285238f2933754a2c78e3e9cc2a1a511de3d378
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 25 14:21:51 2011 -0400
Add the ability to exclude a user from receiving email (eg: autoqa)
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 604aa90..73d8911 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -113,6 +113,9 @@ mail.server = None
mail.debug = False
mail.encoding = 'utf-8-qp'
+# Exclude sending emails to these users
+exclude_mail = 'autoqa'
+
##
## Buildsystem settings
##
diff --git a/bodhi/mail.py b/bodhi/mail.py
index 87b1405..8ac4f72 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -436,6 +436,8 @@ def get_template(update,
use_template='fedora_errata_template'):
def send_mail(sender, to, subject, body):
from turbomail import MailNotEnabledException
+ if to in config.get('exclude_mail').split():
+ return
message = turbomail.Message(sender, to, subject)
message.plain = body
try:
Show replies by date