summaryrefslogtreecommitdiff
path: root/scripts
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-08 22:48:07 +0100
commit5e07504d7a74f0641e2a374b9d12590ce9c9cc89 (patch)
tree99bb5c369c4a18e7431b60108b7f57c7a485b3ef /scripts
parent9cdd4ea5e006fe326bdf39ea437b9ba61a66b778 (diff)
downloadopenembedded-core-5e07504d7a74f0641e2a374b9d12590ce9c9cc89.tar.gz
openembedded-core-5e07504d7a74f0641e2a374b9d12590ce9c9cc89.tar.bz2
openembedded-core-5e07504d7a74f0641e2a374b9d12590ce9c9cc89.zip
oe-build-perf-report-email.py: use proper fallback email address
Use properly formatted fallback email address instead of just the username. 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-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
import re
import shutil
import smtplib
+import socket
import subprocess
import sys
import tempfile
@@ -211,7 +212,8 @@ def send_email(text_fn, html_fn, subject, recipients):
raise ReportError("Neither plain text nor html body specified")
full_name = pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0]
- email = os.environ.get('EMAIL', os.getlogin())
+ email = os.environ.get('EMAIL',
+ '{}@{}'.format(os.getlogin(), socket.getfqdn()))
msg['From'] = "{} <{}>".format(full_name, email)
msg['To'] = ', '.join(recipients)
msg['Subject'] = subject