diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-06 16:07:47 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-06 17:36:13 +0900 |
commit | 60f2a320cf0fad7fe2eac023daa8362d19582f96 (patch) | |
tree | 28173f2b6bd53dfe31aad8a75535221c233b9c31 | |
parent | 1b4307f1baaf36e44a95154861e99d822c2f7e43 (diff) | |
download | buildstream-60f2a320cf0fad7fe2eac023daa8362d19582f96.tar.gz |
_project.py: Assert that the loaded project name is a valid symbol name
Fixes issue #339
-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 cf3c59fef..f49d7aa84 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -256,6 +256,11 @@ class Project(): # The project name, element path and option declarations # are constant and cannot be overridden by option conditional statements self.name = _yaml.node_get(config, str, 'name') + + # Validate that project name is a valid symbol name + _yaml.assert_symbol_name(_yaml.node_get_provenance(config, 'name'), + self.name, "project name") + self.element_path = os.path.join( self.directory, _yaml.node_get(config, str, 'element-path') |