summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/oe-build-perf-report-email.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-04-07 14:51:40 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-10 23:00:44 +0100
commit182dd45f1f368567ab8099e22536a32423018a7b (patch)
tree69ab8ef78dc7cffe74592a3e3924e6a807f6c492 /scripts/contrib/oe-build-perf-report-email.py
parent60658499c2ed0c92ff3be9a67e6950314873a96f (diff)
downloadpoky-182dd45f1f368567ab8099e22536a32423018a7b.tar.gz
oe-build-perf-report-email.py: use proper fallback email address
Use properly formatted fallback email address instead of just the username. (From OE-Core rev: 5e07504d7a74f0641e2a374b9d12590ce9c9cc89) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/oe-build-perf-report-email.py')
-rwxr-xr-xscripts/contrib/oe-build-perf-report-email.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/contrib/oe-build-perf-report-email.py b/scripts/contrib/oe-build-perf-report-email.py
index 81b58ab020..055a7b12cf 100755
--- a/scripts/contrib/oe-build-perf-report-email.py
+++ b/scripts/contrib/oe-build-perf-report-email.py
@@ -21,6 +21,7 @@ import pwd
21import re 21import re
22import shutil 22import shutil
23import smtplib 23import smtplib
24import socket
24import subprocess 25import subprocess
25import sys 26import sys
26import tempfile 27import tempfile
@@ -211,7 +212,8 @@ def send_email(text_fn, html_fn, subject, recipients):
211 raise ReportError("Neither plain text nor html body specified") 212 raise ReportError("Neither plain text nor html body specified")
212 213
213 full_name = pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0] 214 full_name = pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0]
214 email = os.environ.get('EMAIL', os.getlogin()) 215 email = os.environ.get('EMAIL',
216 '{}@{}'.format(os.getlogin(), socket.getfqdn()))
215 msg['From'] = "{} <{}>".format(full_name, email) 217 msg['From'] = "{} <{}>".format(full_name, email)
216 msg['To'] = ', '.join(recipients) 218 msg['To'] = ', '.join(recipients)
217 msg['Subject'] = subject 219 msg['Subject'] = subject