summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-04 17:31:35 +0100
committerDan McGee <dan@archlinux.org>2011-11-04 17:31:35 +0100
commite565fde00f56c7a01ff55a204a0a56d3ce4bf8b4 (patch)
tree6581a30065c3c44b1c17fabbff4e7a6c4215cb02 /packages
parent8ba68aed370c2369bebaaca4d4158b6c40223c0f (diff)
downloadarchweb-e565fde00f56c7a01ff55a204a0a56d3ce4bf8b4.tar.gz
archweb-e565fde00f56c7a01ff55a204a0a56d3ce4bf8b4.tar.xz
Signoff email: prune empty content
Don't send the email at all if there are no packages even in the repository, and don't print empty sections. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/management/commands/signoff_report.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py
index 3431dad..3357bc1 100644
--- a/packages/management/commands/signoff_report.py
+++ b/packages/management/commands/signoff_report.py
@@ -69,6 +69,10 @@ def generate_report(email, repo_name):
new_cutoff = now - timedelta(hours=new_hours)
old_cutoff = now - timedelta(days=old_days)
+ if len(signoff_groups) == 0:
+ # no need to send an email at all
+ return
+
for group in signoff_groups:
spec = group.specification
if spec.known_bad: