This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch juerg/remote-cache-ci in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit bf2eecd467eb0f4e8afb9f5ec57d7c79307f96ab Author: Jürg Billeter <[email protected]> AuthorDate: Wed Oct 28 11:10:24 2020 +0100 element.py: Move get_logs() to internal API --- src/buildstream/_elementproxy.py | 3 --- src/buildstream/_stream.py | 2 +- 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 a7b1f09..53780ea 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 d03480e..520483b 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -796,7 +796,7 @@ class Stream: self._context.messenger.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 8a484a2..bba3506 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -839,14 +839,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 # ############################################################# @@ -2498,6 +2490,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 # #############################################################
