Currently, if we have a large, multi word string for a
value on a keyval, the results email will display it in
a single line. It's better to split the value and display
it indented, instead.

Before

key_to_display: foo.rpm bar.rpm baz.rpm zilch.rpm

After

key_to_display:
  foo.rpm
  bar.rpm
  baz.rpm
  zilch.rpm

CC: Ademar Reis <[email protected]>
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 scheduler/scheduler_models.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scheduler/scheduler_models.py b/scheduler/scheduler_models.py
index 6dd1bae..f725ff0 100644
--- a/scheduler/scheduler_models.py
+++ b/scheduler/scheduler_models.py
@@ -641,7 +641,10 @@ class HostQueueEntry(DBObject):
         if keyval_list:
             for kv in keyval_list:
                 k, v = kv.items()[0]
-                body += "%s: %s\n\n" % (k, v)
+                body += "%s:\n" % k
+                for part in v.split():
+                    body += "  %s\n" % part
+                body += "\n"
 
         body += job_stats['fail_detail']
         body += job_stats['warn_detail']
-- 
1.7.11.4

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to