diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-24 12:08:42 +0100 |
---|---|---|
committer | Abderrahim Kitouni <akitouni@gnome.org> | 2020-08-26 12:47:05 +0100 |
commit | 19d4ae110f53a88d88e12317244dfcdab344e9e9 (patch) | |
tree | 7339e33360ee0f46094ea35a06150115f4da7478 | |
parent | 00c3f7dbdd4c48b1bf552a41cb41fe240f597abc (diff) | |
download | buildstream-19d4ae110f53a88d88e12317244dfcdab344e9e9.tar.gz |
element.py: Add __get_artifact_directory() method
-rw-r--r-- | buildstream/element.py | 19 |
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 |