diff --git a/scripts/contrib/oe-build-perf-report-email.py b/scripts/contrib/oe-build-perf-report-email.py index 64e85c26ad..913847bbed 100755 --- a/scripts/contrib/oe-build-perf-report-email.py +++ b/scripts/contrib/oe-build-perf-report-email.py @@ -25,6 +25,7 @@ import socket import subprocess import sys import tempfile +from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText @@ -111,15 +112,6 @@ def decode_png(infile, outfile): subprocess.check_output(['optipng', outfile], stderr=subprocess.STDOUT) -def encode_png(pngfile): - """Encode png into a html element""" - with open(pngfile, 'rb') as f: - data = f.read() - - b64_data = base64.b64encode(data) - return '\n' - - def mangle_html_report(infile, outfile, pngs): """Mangle html file into a email compatible format""" paste = True @@ -144,9 +136,7 @@ def mangle_html_report(infile, outfile, pngs): # Replace charts with elements match = re.match('
\n'.format(match.group('id') + '.png')) - png_file = os.path.join(png_dir, match.group('id') + '.png') - f_out.write(encode_png(png_file)) + f_out.write('