send-reports: Truncate content to 50K.
[patchq.git] / send-reports.py
index b526683..122765f 100755 (executable)
@@ -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)