diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2018-03-26 17:51:34 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-04-12 18:03:09 +0000 |
commit | bea028a8239d194a4969650a11bb6bf61298f9da (patch) | |
tree | 4e4ce827dde1b8189b4cda62b29689dded61488e /buildstream/_frontend/widget.py | |
parent | 7b0a96564f4ec5105fdcc5dd440656ba29599ea2 (diff) | |
download | buildstream-bea028a8239d194a4969650a11bb6bf61298f9da.tar.gz |
frontend: Control indentations of multi-line values
Diffstat (limited to 'buildstream/_frontend/widget.py')
-rw-r--r-- | buildstream/_frontend/widget.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index 7b5ade005..f7af4c614 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -658,6 +658,11 @@ class LogLine(Widget): max_key_len = max(len(key), max_key_len) for key, value in values.items(): + if isinstance(value, str) and '\n' in value: + text += self.format_profile.fmt(" {}:\n".format(key)) + text += textwrap.indent(value, self.indent) + continue + text += self.format_profile.fmt(" {}: {}".format(key, ' ' * (max_key_len - len(key)))) if style_value: text += self.content_profile.fmt(str(value)) |