diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-24 12:08:42 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-02-28 05:14:47 +0100 |
commit | f4a4b384382b31081c499d2a567ea2de4efc00cd (patch) | |
tree | 50af698d7de6702fbb07d1bf22a7ee58d823b46d | |
parent | 8be86f4f077a4040a0f3b68f4daf2f27aa8cd443 (diff) | |
download | buildstream-f4a4b384382b31081c499d2a567ea2de4efc00cd.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 b99e6fb4d..cef31417a 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -2695,6 +2695,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 |