diff --git a/speedtest.py b/speedtest.py index 5c0f68d..80c7cb5 100644 --- a/speedtest.py +++ b/speedtest.py @@ -75,9 +75,8 @@ def get_client(config: ConfigParser): return client -def send_data(config: ConfigParser, body: str, messages: list): +def send_data(config: ConfigParser, email_content: str, messages: list): client = get_client(config) - email_content = "" for message in messages: if not message.contents: continue @@ -93,7 +92,6 @@ def send_data(config: ConfigParser, body: str, messages: list): texts = body.text for text in texts: content_, args = text.content, text.args - print("args", args) email_content += content_.format(*text.args) email_content += "\n" @@ -230,7 +228,7 @@ def main(): raise RuntimeError("No tests performed!") client = get_client(mail_section) - body = "User name: %s; ISP: %s" % (name, isp) + body = "# User name: %s; ISP: %s\n" % (name, isp) send_data(mail_section, body, messages) logger.info("Done! You're amazing!")