Send Reviews Weekly from nobody@fedoraproject.org

Added --email-from option for bz-review-report script and used this option in cron with "nobody@fedoraproject.org".
This commit is contained in:
clime 2016-07-29 11:26:02 +02:00 committed by Kevin Fenzi
parent 312a84dce2
commit 8aa7b4e1db
2 changed files with 8 additions and 2 deletions

View file

@ -1 +1 @@
8 10 * * 1 root /usr/bin/python /usr/local/bin/bz-review-report.py -r rev-com -u --email=devel@lists.fedoraproject.org &> /dev/null
8 10 * * 1 root /usr/bin/python /usr/local/bin/bz-review-report.py -r rev-com -u --email=devel@lists.fedoraproject.org --email-from=nobody@fedoraproject.org &> /dev/null

View file

@ -208,6 +208,9 @@ if __name__ == '__main__':
parser.add_option("-m", "--email", action="store", dest="email_address",
help="If specified, send results to the given email address instead of generating 'output.txt' file.")
parser.add_option("-f", "--email-from", action="store", dest="email_from",
help="Optional. If specified, then this address will be used for From: field")
parser.add_option("-n", "--username", action="store", dest="username", help="BZ username")
parser.add_option("-p", "--password", action="store", dest="password", help="BZ password")
@ -422,7 +425,10 @@ if __name__ == '__main__':
file.close()
subject = "Reviews Weekly"
me = socket.gethostname()
if options.email_from:
me = options.email_from
else:
me = socket.gethostname()
you = options.email_address
msg['Subject'] = subject