From c1a6c5981162b495003a1c73e3131da0704ab13a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Mar 2008 12:43:12 +0000 Subject: [PATCH] Support ${HOST} substitution in "From" field. Thanks to wschlich. (trunk r9510) svn path=/main/branches/2.1.2/; revision=9570 --- pym/elog_modules/mod_mail.py | 1 + pym/elog_modules/mod_mail_summary.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pym/elog_modules/mod_mail.py b/pym/elog_modules/mod_mail.py index 058faa7c0..01771262d 100644 --- a/pym/elog_modules/mod_mail.py +++ b/pym/elog_modules/mod_mail.py @@ -14,6 +14,7 @@ def process(mysettings, cpv, logentries, fulltext): myrecipient = "root@localhost" myfrom = mysettings["PORTAGE_ELOG_MAILFROM"] + myfrom = myfrom.replace("${HOST}", socket.getfqdn()) mysubject = mysettings["PORTAGE_ELOG_MAILSUBJECT"] mysubject = mysubject.replace("${PACKAGE}", cpv) mysubject = mysubject.replace("${HOST}", socket.getfqdn()) diff --git a/pym/elog_modules/mod_mail_summary.py b/pym/elog_modules/mod_mail_summary.py index 339b4b827..50e8171df 100644 --- a/pym/elog_modules/mod_mail_summary.py +++ b/pym/elog_modules/mod_mail_summary.py @@ -39,6 +39,7 @@ def _finalize(mysettings, items): myrecipient = "root@localhost" myfrom = mysettings["PORTAGE_ELOG_MAILFROM"] + myfrom = myfrom.replace("${HOST}", socket.getfqdn()) mysubject = mysettings["PORTAGE_ELOG_MAILSUBJECT"] mysubject = mysubject.replace("${PACKAGE}", count) mysubject = mysubject.replace("${HOST}", socket.getfqdn()) -- 2.26.2