aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/scripts/rpkigui-check-expired.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2012-08-24 20:36:50 +0000
committerMichael Elkins <melkins@tislabs.com>2012-08-24 20:36:50 +0000
commit72395ab40f21eb5f6fd4371c0d076e84a35ad266 (patch)
tree3b16ade1357a2c1a0858899fccc6e75422517684 /rpkid/portal-gui/scripts/rpkigui-check-expired.py
parent7a0beac41cae1b98eac4752bd9e263491c1b7f98 (diff)
do not assume that user.email is not None
svn path=/trunk/; revision=4660
Diffstat (limited to 'rpkid/portal-gui/scripts/rpkigui-check-expired.py')
-rw-r--r--rpkid/portal-gui/scripts/rpkigui-check-expired.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-check-expired.py b/rpkid/portal-gui/scripts/rpkigui-check-expired.py
index 616c573c..c996b181 100644
--- a/rpkid/portal-gui/scripts/rpkigui-check-expired.py
+++ b/rpkid/portal-gui/scripts/rpkigui-check-expired.py
@@ -190,9 +190,10 @@ for h in qs:
if options.email:
notify_emails = get_email_list(h)
- t = """This is an automated notice about the upcoming expiration of RPKI resources for the handle %s on %s. You are receiving this notification because your email address is either registered in a Ghostbuster record, or as the default email address for the account.\n\n""" % (h.handle, host)
+ if notify_emails:
+ t = """This is an automated notice about the upcoming expiration of RPKI resources for the handle %s on %s. You are receiving this notification because your email address is either registered in a Ghostbuster record, or as the default email address for the account.\n\n""" % (h.handle, host)
- send_mail(subject='RPKI expiration notice for %s' % h.handle,
- message=t + s, from_email=from_email, recipient_list=notify_emails)
+ send_mail(subject='RPKI expiration notice for %s' % h.handle,
+ message=t + s, from_email=from_email, recipient_list=notify_emails)
sys.exit(0)