diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2018-03-14 13:11:01 +0000 |
---|---|---|
committer | Tristan Maat <tristan.maat@codethink.co.uk> | 2018-03-27 14:32:52 +0100 |
commit | f761140f18a7d54caf6e6dba8a722b9ff1f4430e (patch) | |
tree | 4175da85352754b9f4f62d281454ab0c331cc6dc /buildstream/_frontend/cli.py | |
parent | fb332267bfccc54ea7bc57af7a676a4eee635bcd (diff) | |
download | buildstream-f761140f18a7d54caf6e6dba8a722b9ff1f4430e.tar.gz |
Make workspaces use objects instead of pipeline helper methods
Diffstat (limited to 'buildstream/_frontend/cli.py')
-rw-r--r-- | buildstream/_frontend/cli.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py index c0bf74117..c6c9d8156 100644 --- a/buildstream/_frontend/cli.py +++ b/buildstream/_frontend/cli.py @@ -641,7 +641,7 @@ def workspace_close(app, remove_dir, element): app.initialize((element,)) - if app.pipeline.project._get_workspace(app.pipeline.targets[0].name) is None: + if app.pipeline.project._workspaces.get_workspace(app.pipeline.targets[0]) is None: click.echo("ERROR: Workspace '{}' does not exist".format(element), err=True) sys.exit(-1) @@ -716,13 +716,12 @@ def workspace_list(app): sys.exit(-1) workspaces = [] - for element_name, directory in project._list_workspaces(): - workspace_ = { + for element_name, workspace_ in project._workspaces.list(): + workspace_detail = { 'element': element_name, - 'directory': directory, + 'directory': workspace_.path, } - - workspaces.append(workspace_) + workspaces.append(workspace_detail) _yaml.dump({ 'workspaces': workspaces |