diff options
author | Jürg Billeter <j@bitron.ch> | 2020-10-28 11:10:24 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-12-04 16:29:06 +0100 |
commit | 2bc6fd02509f2a112917ba9ee0ecf3baff26894c (patch) | |
tree | 631e9f1419019d96439b1a43861d9a4fccda2cff | |
parent | 5ef4aba0d739d5bb97c3cb790976ba82768c5553 (diff) | |
download | buildstream-2bc6fd02509f2a112917ba9ee0ecf3baff26894c.tar.gz |
element.py: Move get_logs() to internal API
-rw-r--r-- | src/buildstream/_elementproxy.py | 3 | ||||
-rw-r--r-- | src/buildstream/_stream.py | 2 | ||||
-rw-r--r-- | src/buildstream/element.py | 18 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/buildstream/_elementproxy.py b/src/buildstream/_elementproxy.py index a7b1f09a0..53780ea02 100644 --- a/src/buildstream/_elementproxy.py +++ b/src/buildstream/_elementproxy.py @@ -146,9 +146,6 @@ class ElementProxy(PluginProxy): def get_variable(self, varname: str) -> Optional[str]: return cast("Element", self._plugin).get_variable(varname) - def get_logs(self) -> List[str]: - return cast("Element", self._plugin).get_logs() - ############################################################## # Element Internal APIs # ############################################################## diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index db3cc0998..e7a7146fe 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -670,7 +670,7 @@ class Stream: self._message(MessageType.WARN, "{} is cached without log files".format(ref)) continue - artifact_logs[obj.name] = obj.get_logs() + artifact_logs[obj.name] = obj._get_logs() return artifact_logs diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 742c06a91..514548dfb 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -867,14 +867,6 @@ class Element(Plugin): self.__batch_prepare_assemble_flags = flags self.__batch_prepare_assemble_collect = collect - def get_logs(self) -> List[str]: - """Obtain a list of log file paths - - Returns: - A list of log file paths - """ - return cast(Artifact, self.__artifact).get_logs() - ############################################################# # Private Methods used in BuildStream # ############################################################# @@ -2494,6 +2486,16 @@ class Element(Plugin): self.__whitelist_regex = re.compile(expression) return self.__whitelist_regex.match(os.path.join(os.sep, path)) + # _get_logs() + # + # Obtain a list of log file paths + # + # Returns: + # A list of log file paths + # + def _get_logs(self) -> List[str]: + return cast(Artifact, self.__artifact).get_logs() + ############################################################# # Private Local Methods # ############################################################# |