[Notes] [Git][BuildStream/buildstream][bst-1.2] 3 commits: buildstream/_project.py: Report if project.conf is missing name



Title: GitLab

Tristan Van Berkom pushed to branch bst-1.2 at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_project.py
    ... ... @@ -395,6 +395,17 @@ class Project():
    395 395
                     "Project requested format version {}, but BuildStream {}.{} only supports up until format version {}"
    
    396 396
                     .format(format_version, major, minor, BST_FORMAT_VERSION))
    
    397 397
     
    
    398
    +        # FIXME:
    
    399
    +        #
    
    400
    +        #   Performing this check manually in the absense
    
    401
    +        #   of proper support from _yaml.node_get(), this should
    
    402
    +        #   be removed in favor of a proper accessor function
    
    403
    +        #   from the _yaml module when #591 is fixed.
    
    404
    +        #
    
    405
    +        if self._project_conf.get('name') is None:
    
    406
    +            raise LoadError(LoadErrorReason.INVALID_DATA,
    
    407
    +                            "{}: project.conf does not contain expected key '{}'".format(projectfile, 'name'))
    
    408
    +
    
    398 409
             # The project name, element path and option declarations
    
    399 410
             # are constant and cannot be overridden by option conditional statements
    
    400 411
             self.name = _yaml.node_get(pre_config_node, str, 'name')
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]