You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/07/31 07:21:23 UTC

[buildstream] 01/04: element.py: Remove redundant context from Plugin.warn() invokation

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/full-build-tree
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit f0153ffc90965c4df16cb6088f8bbeddc8c5f4b7
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Sun Jul 31 15:17:05 2022 +0900

    element.py: Remove redundant context from Plugin.warn() invokation
    
    When calling `self.warn()` there is no need to print the element name or
    print "WARNING", this context is implied by calling `Plugin.warn()` already.
---
 src/buildstream/element.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 8f47a5b13..7fbadc20b 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1472,7 +1472,7 @@ class Element(Plugin):
                 import_dir = self.__artifact.get_buildtree()
                 if not import_dir:
                     detail = "Element type either does not expect a buildtree or it was explictily cached without one."
-                    self.warn("WARNING: {} Artifact contains an empty buildtree".format(self.name), detail=detail)
+                    self.warn("Artifact contains an empty buildtree", detail=detail)
 
             # No cached buildtree, stage source from source cache
             else: