Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: gatekeeper_mailer.py

Issue 99423008: Accept subject template for mailer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-build
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mailer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gatekeeper_mailer.py
diff --git a/gatekeeper_mailer.py b/gatekeeper_mailer.py
index d8153465e5a2759983ebd97472fe6d69deaaccdd..66d47ec1cba4dba23d2c7b873c25e05169fcb99c 100644
--- a/gatekeeper_mailer.py
+++ b/gatekeeper_mailer.py
@@ -5,7 +5,7 @@
"""Provides mailer templates for gatekeeper_ng.
-This module populates jinja mail templates to notify tree watchers when the
+This module populates jinja mail templates to notify tree watchers when the
tree is closed.
"""
@@ -28,17 +28,16 @@ class MailTemplate(object):
"""Encapsulates a buildbot status email."""
status_header = 'Automatically closing tree for "%(steps)s" on "%(builder)s"'
+ default_subject = ('buildbot %(result)s in %(projectName)s on %(builder)s, '
+ 'revision %(revision)s')
+
+ def __init__(self, waterfall_url, build_url, project_name, fromaddr,
+ reply_to=None, subject=None):
- def __init__(self, waterfall_url, build_url,
- project_name,
- fromaddr,
- reply_to=None,
- subject='buildbot %(result)s in %(projectName)s on %(builder)s, '
- 'revision %(revision)s'):
self.reply_to = reply_to
self.fromaddr = fromaddr
- self.subject = subject
+ self.subject = subject or self.default_subject
self.waterfall_url = waterfall_url.rstrip('/') + '/'
self.build_url = build_url
self.project_name = project_name
« no previous file with comments | « no previous file | mailer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698