diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-08-31 06:51:54 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-08-31 06:51:54 +0000 |
commit | 2b94532a3844b67bf7a3d4a1aee251a836e1144a (patch) | |
tree | 65c5da752591278904c4414dbb73380e669df5ab | |
parent | b83f7fa1c33f864288685d93f054c2966c94709a (diff) | |
parent | f861dc0b87467615918c1b2ffcf89c0345ca31bb (diff) | |
download | buildstream-2b94532a3844b67bf7a3d4a1aee251a836e1144a.tar.gz |
Merge branch 'tristan/591-workaround-1.2' into 'bst-1.2'
Backport workaround for #591
See merge request BuildStream/buildstream!767
-rw-r--r-- | buildstream/_project.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py index 873f3387e..d5504e201 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -395,6 +395,17 @@ class Project(): "Project requested format version {}, but BuildStream {}.{} only supports up until format version {}" .format(format_version, major, minor, BST_FORMAT_VERSION)) + # FIXME: + # + # Performing this check manually in the absense + # of proper support from _yaml.node_get(), this should + # be removed in favor of a proper accessor function + # from the _yaml module when #591 is fixed. + # + if self._project_conf.get('name') is None: + raise LoadError(LoadErrorReason.INVALID_DATA, + "{}: project.conf does not contain expected key '{}'".format(projectfile, 'name')) + # The project name, element path and option declarations # are constant and cannot be overridden by option conditional statements self.name = _yaml.node_get(pre_config_node, str, 'name') |