diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-05 17:32:42 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-05 17:32:42 +0900 |
commit | 207b986f5e0e6c71cd653113db69180bcd5e571b (patch) | |
tree | 58b296d22c84b9d9495ad2bd994bca95af2210bc | |
parent | ab63b5364d9035ae46ebba2a2983ffbe3c82c810 (diff) | |
download | buildstream-207b986f5e0e6c71cd653113db69180bcd5e571b.tar.gz |
_frontend/widget.py: Print the workspace directory for %{workspace-dirs}
Instead of printing the list of workspace directory for each source.
This fixes some fallout from the changes to make workspaces element-wide
instead of being on a per-source basis, which was merged as merge request !257
as a part of issue #209.
-rw-r--r-- | buildstream/_frontend/widget.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index 692510eb0..52eff0ab8 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -706,11 +706,10 @@ class LogLine(Widget): # Workspace-dirs if "%{workspace-dirs" in format_: - dirs = [path.replace(os.getenv('HOME', '/root'), '~') - for path in element._workspace_dirs()] - if dirs: - line = p.fmt_subst( - line, 'workspace-dirs', "Workspaces: " + ", ".join(dirs)) + workspace = element._get_workspace() + if workspace is not None: + path = workspace.path.replace(os.getenv('HOME', '/root'), '~') + line = p.fmt_subst(line, 'workspace-dirs', "Workspace: {}".format(path)) else: line = p.fmt_subst( line, 'workspace-dirs', '') |