summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/widget.py
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2019-02-14 10:50:08 +0000
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2019-02-14 17:02:04 +0000
commitc7f71451bff4b0cc3fd1404783c54cc55974a625 (patch)
treef6891017d2ab5f440adea7457aafa58544a0dd3d /buildstream/_frontend/widget.py
parent56c07baad4cdd79e2fbab1fda856107ad6e3bfb7 (diff)
downloadbuildstream-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.py2
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))