summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/contrib/oe-build-perf-report-email.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/contrib/oe-build-perf-report-email.py b/scripts/contrib/oe-build-perf-report-email.py
index 055a7b12cf..261ca514e5 100755
--- a/scripts/contrib/oe-build-perf-report-email.py
+++ b/scripts/contrib/oe-build-perf-report-email.py
@@ -211,9 +211,10 @@ def send_email(text_fn, html_fn, subject, recipients):
211 else: 211 else:
212 raise ReportError("Neither plain text nor html body specified") 212 raise ReportError("Neither plain text nor html body specified")
213 213
214 full_name = pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0] 214 pw_data = pwd.getpwuid(os.getuid())
215 full_name = pw_data.pw_gecos.split(',')[0]
215 email = os.environ.get('EMAIL', 216 email = os.environ.get('EMAIL',
216 '{}@{}'.format(os.getlogin(), socket.getfqdn())) 217 '{}@{}'.format(pw_data.pw_name, socket.getfqdn()))
217 msg['From'] = "{} <{}>".format(full_name, email) 218 msg['From'] = "{} <{}>".format(full_name, email)
218 msg['To'] = ', '.join(recipients) 219 msg['To'] = ', '.join(recipients)
219 msg['Subject'] = subject 220 msg['Subject'] = subject