summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildstream/_loader/loader.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py
index 54efd27ae..6ace3624b 100644
--- a/src/buildstream/_loader/loader.py
+++ b/src/buildstream/_loader/loader.py
@@ -33,7 +33,6 @@ from .types import Symbol
from . import loadelement
from .loadelement import LoadElement, Dependency, DependencyType, extract_depends_from_node
from ..types import CoreWarnings, _KeyStrength
-from .._message import Message, MessageType
# Loader():
@@ -1016,8 +1015,7 @@ class Loader:
if self.project._warning_is_fatal(warning_token):
raise LoadError(brief, warning_token)
- message = Message(MessageType.WARN, brief)
- self.load_context.context.messenger.message(message)
+ self.load_context.context.messenger.warn(brief)
# Print warning messages if any of the specified elements have invalid names.
#