diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-04-07 14:51:40 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-10 23:00:44 +0100 |
commit | 182dd45f1f368567ab8099e22536a32423018a7b (patch) | |
tree | 69ab8ef78dc7cffe74592a3e3924e6a807f6c492 /scripts | |
parent | 60658499c2ed0c92ff3be9a67e6950314873a96f (diff) | |
download | poky-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')
-rwxr-xr-x | scripts/contrib/oe-build-perf-report-email.py | 4 |
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 | |||
21 | import re | 21 | import re |
22 | import shutil | 22 | import shutil |
23 | import smtplib | 23 | import smtplib |
24 | import socket | ||
24 | import subprocess | 25 | import subprocess |
25 | import sys | 26 | import sys |
26 | import tempfile | 27 | import 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 |