From a04569d3fe815bd27481aa5419efc30f3bc09480 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 7 Jul 2017 15:00:14 +0100 Subject: [PATCH] send-reports: Truncate content to 50K. --- README | 3 +++ send-reports.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/README b/README index 2e67f3f..954c227 100644 --- a/README +++ b/README @@ -99,6 +99,9 @@ To do: - Allow dependencies between tests (ie. test if the code compiles first before running other tests). + - Send full reports to a website. Requires another queue and another + task to update the website. + Similar projects: - The 0-day test service is a very comprehensive set of tests diff --git a/send-reports.py b/send-reports.py index b526683..122765f 100755 --- a/send-reports.py +++ b/send-reports.py @@ -34,6 +34,11 @@ while True: if config.reply_override is not None: to = [config.reply_override] + # If the content is over 50K then truncate it to the last 50K. + # XXX Upload full logs to a website. + if len(content) > 50000: + content = content[-50000:] + # Construct an email of type text/plain with the body of the # message. msg = MIMEText(content) -- 1.8.3.1