summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.avv@gmail.com>2018-08-30 20:52:29 +0000
committerTiago Gomes <tiago.avv@gmail.com>2018-08-30 20:52:29 +0000
commit95121148b94682ddec0f3f4de7f330fae0c75285 (patch)
tree2e17512c7b335fb0c3b3c904266e749a5608e74d
parent8cd719eb91acb2c240b459214947a5dd77204106 (diff)
parent18d0bfb41d262aad2d76b4b8155ea76e7349b1c5 (diff)
downloadbuildstream-95121148b94682ddec0f3f4de7f330fae0c75285.tar.gz
Merge branch 'tpollard/591' into 'master'
buildstream/_project.py: Report if project.conf is missing name See merge request BuildStream/buildstream!680
-rw-r--r--buildstream/_project.py5
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')