summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bruce Park <robert.park@canonical.com>2017-03-09 16:33:09 (GMT)
committerRobert Bruce Park <robert.park@canonical.com>2017-03-09 16:33:09 (GMT)
commitd66116d80948d8ff647dabe60e7ca5b83c4695df (patch)
treec60dcfe1375c8d462e45583fe95197d77b2446b9
parentb896fbf038657d85a809ee75d3a7da9228a855f7 (diff)
Update email MESSAGE_BODY to reflect dynamic max_age.email-tweaks
-rw-r--r--britney2/policies/email.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/britney2/policies/email.py b/britney2/policies/email.py
index b612bb7..10bb3ed 100644
--- a/britney2/policies/email.py
+++ b/britney2/policies/email.py
@@ -22,9 +22,11 @@ BOTS = {
USER + 'katie',
}
-MESSAGE_BODY = """{source_name} {version} needs attention.
+MESSAGE_BODY = """Hi,
-It has been stuck in {series}-proposed for over a day.
+{source_name} {version} needs attention.
+
+It has been stuck in {series}-proposed for {age} day{plural}.
You either sponsored or uploaded this package, please investigate why it hasn't been approved for migration.
@@ -33,6 +35,8 @@ http://people.canonical.com/~ubuntu-archive/proposed-migration/{series}/update_e
https://wiki.ubuntu.com/ProposedMigration
If you have any questions about this email, please ask them in #ubuntu-release channel on Freenode IRC.
+
+Regards, Ubuntu Release Team.
"""
@@ -144,7 +148,9 @@ class EmailPolicy(BasePolicy, Rest):
series = self.options.series
version = source_data_srcdist.version
sent = self.cache.get(source_name, {}).get(version, False)
- stuck = (excuse.daysold or 0) >= max_age
+ age = excuse.daysold or 0
+ stuck = age >= max_age
+ plural = 's' if age != 1 else ''
if self.dry_run:
self.log("[email dry run] Considering: %s/%s: %s" %
(source_name, version, "stuck" if stuck else "not stuck"))