diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2020-12-22 09:45:10 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-12-22 09:45:10 +0000 |
commit | 096c7292247c0aee4483b42f1d8da67c124dbcac (patch) | |
tree | d3c12e99b8765c1b54a055ac081ed3554aa4f65c /src/buildstream/_project.py | |
parent | ba5664fff47ad0e0a2614c1bf893ae5c31d747e7 (diff) | |
parent | ad4cbd31b23035bfe5a0b7af87c6fff8bfbef740 (diff) | |
download | buildstream-096c7292247c0aee4483b42f1d8da67c124dbcac.tar.gz |
Merge branch 'tristan/messenger-convenience-functions' into 'master'
Added core facing convenience logging functions
See merge request BuildStream/buildstream!2119
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r-- | src/buildstream/_project.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py index 2534e0209..0bd398429 100644 --- a/src/buildstream/_project.py +++ b/src/buildstream/_project.py @@ -42,7 +42,6 @@ from .types import CoreWarnings from ._projectrefs import ProjectRefs, ProjectRefStorage from ._loader import Loader, LoadContext from .element import Element -from ._message import Message, MessageType from ._includes import Includes from ._workspaces import WORKSPACE_PROJECT_FILE @@ -474,9 +473,7 @@ class Project: detail = "The following inline specified source references will be ignored:\n\n" lines = ["{}:{}".format(source._get_provenance(), ref) for source, ref in redundant_refs] detail += "\n".join(lines) - self._context.messenger.message( - Message(MessageType.WARN, "Ignoring redundant source references", detail=detail) - ) + self._context.messenger.warn("Ignoring redundant source references", detail=detail) return elements @@ -909,12 +906,9 @@ class Project: # Deprecation check if not fail_on_overlap.is_none(): - self._context.messenger.message( - Message( - MessageType.WARN, - "Use of fail-on-overlap within project.conf " - + "is deprecated. Consider using fatal-warnings instead.", - ) + self._context.messenger.warn( + "Use of fail-on-overlap within project.conf " + + "is deprecated. Consider using fatal-warnings instead.", ) if (CoreWarnings.OVERLAPS not in self._fatal_warnings) and fail_on_overlap.as_bool(): |