summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-24 12:08:42 +0100
committerAbderrahim Kitouni <akitouni@gnome.org>2020-08-26 12:47:05 +0100
commit19d4ae110f53a88d88e12317244dfcdab344e9e9 (patch)
tree7339e33360ee0f46094ea35a06150115f4da7478
parent00c3f7dbdd4c48b1bf552a41cb41fe240f597abc (diff)
downloadbuildstream-19d4ae110f53a88d88e12317244dfcdab344e9e9.tar.gz
element.py: Add __get_artifact_directory() method
-rw-r--r--buildstream/element.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 77faa18ec..06152ff3f 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2505,6 +2505,25 @@ class Element(Plugin):
return key
+ # __get_artifact_directory():
+ #
+ # Get a virtual directory for the artifact contents
+ #
+ # Args:
+ # key (str): The key for the artifact to extract,
+ # or None for the default key
+ #
+ # Returns:
+ # (Directory): The virtual directory object
+ # (str): The chosen key
+ #
+ def __get_artifact_directory(self, key=None):
+
+ if key is None:
+ key = self.__get_extract_key()
+
+ return (self.__artifacts.get_artifact_directory(self, key), key)
+
# __extract():
#
# Extract an artifact and return the directory