diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2019-02-14 10:50:08 +0000 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2019-02-14 17:02:04 +0000 |
commit | c7f71451bff4b0cc3fd1404783c54cc55974a625 (patch) | |
tree | f6891017d2ab5f440adea7457aafa58544a0dd3d /buildstream/_frontend/widget.py | |
parent | 56c07baad4cdd79e2fbab1fda856107ad6e3bfb7 (diff) | |
download | buildstream-danielsilverstone-ct/variables-rework.tar.gz |
Variables: Rework how expansion strings workdanielsilverstone-ct/variables-rework
Rather than constantly using regular expressions and retrieval from YAML
nodes, pre-parse expansion strings into a list representation cached
for reuse, and then expand them as simple string concatenation.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Diffstat (limited to 'buildstream/_frontend/widget.py')
-rw-r--r-- | buildstream/_frontend/widget.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index b8e3d920a..2920d657d 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -398,7 +398,7 @@ class LogLine(Widget): # Variables if "%{vars" in format_: - variables = _yaml.node_sanitize(element._Element__variables.variables) + variables = _yaml.node_sanitize(element._Element__variables.flat) line = p.fmt_subst( line, 'vars', yaml.round_trip_dump(variables, default_flow_style=False, allow_unicode=True)) |