diff options
-rw-r--r-- | buildstream/_project.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py index c489e9025..e94892751 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -398,6 +398,11 @@ class Project(): "Project requested format version {}, but BuildStream {}.{} only supports up until format version {}" .format(format_version, major, minor, BST_FORMAT_VERSION)) + # Check if project.conf contains name key field + 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') |