From: Ondrej Lichtner olichtne@redhat.com
If a result description is multiline it should be added below the header and the lines should be indented.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Controller/RunSummaryFormatter.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lnst/Controller/RunSummaryFormatter.py b/lnst/Controller/RunSummaryFormatter.py index ea9a6dd..670c1f7 100644 --- a/lnst/Controller/RunSummaryFormatter.py +++ b/lnst/Controller/RunSummaryFormatter.py @@ -11,6 +11,7 @@ __author__ = """ olichtne@redhat.com (Ondrej Lichtner) """
+from lnst.Common.Utils import indent from lnst.Common.Colours import decorate_with_preset from lnst.Controller.Common import ControllerError from lnst.Controller.MachineMapper import format_match_description @@ -102,10 +103,12 @@ class RunSummaryFormatter(object): except IndexError: pass
- output_lines.append("{res} {src}\t{desc}".format( + output_lines.append("{res} {src}{desc}".format( res = self._format_success(res.success), src = self._format_source(res), - desc = res.description) + desc = ("\t{}".format(res.description) + if res.description.count('\n') == 0 + else "\n{}".format(indent(res.description, 4)))))
if res.data_level <= self._level: output_lines.extend(self._format_data(res.data))