diff options
author | James Ennis <james.ennis@codethink.com> | 2019-01-22 18:03:33 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2019-02-13 09:35:45 +0000 |
commit | 6951cfc8554043d5669ea927f7b5dd637467c6ac (patch) | |
tree | a561562f0f55d57d87446c3d16045e4e323c7315 /buildstream | |
parent | 55c15f8f7462c4795760e84ae63ac6f5b89dd908 (diff) | |
download | buildstream-6951cfc8554043d5669ea927f7b5dd637467c6ac.tar.gz |
_project.py: Add create_artifact_element() method
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/_project.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py index 51cdd5e2b..028bdcc9f 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -26,6 +26,7 @@ from . import utils from . import _cachekey from . import _site from . import _yaml +from ._artifactelement import ArtifactElement from ._profile import Topics, profile_start, profile_end from ._exceptions import LoadError, LoadErrorReason from ._options import OptionPool @@ -255,6 +256,19 @@ class Project(): else: return self.config.element_factory.create(self._context, self, meta) + # create_artifact_element() + # + # Instantiate and return an ArtifactElement + # + # Args: + # ref (str): A string of the artifact ref + # + # Returns: + # (ArtifactElement): A newly created ArtifactElement object of the appropriate kind + # + def create_artifact_element(self, ref): + return ArtifactElement(self._context, ref) + # create_source() # # Instantiate and return a Source |