diff options
author | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-08-04 22:51:25 +0900 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-08-10 08:33:55 +0000 |
commit | 7f2bc71e74c9914d65775a68a61781e9851f6238 (patch) | |
tree | 5346388794047adbb64e63633a4cbe003ab4f907 /src/buildstream/_workspaces.py | |
parent | 89b3fa48d48ab559b582a0daa9daa6aac0d2604c (diff) | |
download | buildstream-7f2bc71e74c9914d65775a68a61781e9851f6238.tar.gz |
_yaml.pyx: Make shortname a mandatory argument to _yaml.load()
This ensures that important calls to this function do give some
thought to providing a reasonable shortname, which will be used
as a display name in errors.
This continues to support `None` as a shortname, which is used
in various tests which don't need to provide a reasonable user
facing error.
The buildstream.testing module now exports a `load_yaml` function
which only takes a filename and no shortname.
Diffstat (limited to 'src/buildstream/_workspaces.py')
-rw-r--r-- | src/buildstream/_workspaces.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_workspaces.py b/src/buildstream/_workspaces.py index a54a17ff1..f1fc353a7 100644 --- a/src/buildstream/_workspaces.py +++ b/src/buildstream/_workspaces.py @@ -449,7 +449,7 @@ class Workspaces: def _load_config(self): workspace_file = self._get_filename() try: - node = _yaml.load(workspace_file) + node = _yaml.load(workspace_file, shortname="workspaces.yml") except LoadError as e: if e.reason == LoadErrorReason.MISSING_FILE: # Return an empty dict if there was no workspace file |