diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-02-23 20:19:31 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-02-25 00:20:14 +0900 |
commit | 89f280867dcf012d08d97a6911d912865e99f912 (patch) | |
tree | 70f87416ee568388ea1a84c50170fa20ad18dc61 /buildstream/_context.py | |
parent | f6ceefbb3dabc11b34c6b380925eaecccfa99060 (diff) | |
download | buildstream-89f280867dcf012d08d97a6911d912865e99f912.tar.gz |
_context.py: Added _get_toplevel_project() convenience accessor
Diffstat (limited to 'buildstream/_context.py')
-rw-r--r-- | buildstream/_context.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/buildstream/_context.py b/buildstream/_context.py index 9801f54c4..725a9c31c 100644 --- a/buildstream/_context.py +++ b/buildstream/_context.py @@ -228,6 +228,17 @@ class Context(): def _get_projects(self): return self._projects + # _get_toplevel_project(): + # + # Return the toplevel project, the one which BuildStream was + # invoked with as opposed to a junctioned subproject. + # + # Returns: + # (list): The list of projects + # + def _get_toplevel_project(self): + return self._projects[0] + # _get_overrides(): # # Fetch the override dictionary for the active project. This returns |