diff options
author | Tristan van Berkom <tristan@codethink.co.uk> | 2020-12-21 17:18:01 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan@codethink.co.uk> | 2020-12-22 14:30:59 +0900 |
commit | 50c0e9c17edf8d23dfabd8cf1931e181024941c8 (patch) | |
tree | 4bc510839646125667be5468940a6cba5c3632a6 /src | |
parent | 54e59c002f9e17714cb952503e0b36da82566f96 (diff) | |
download | buildstream-50c0e9c17edf8d23dfabd8cf1931e181024941c8.tar.gz |
_project.py: Use Messenger convenience functions
Diffstat (limited to 'src')
-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(): |