summaryrefslogtreecommitdiff
path: root/src/buildstream/plugin.py
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-07-02 17:14:44 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-05 09:44:45 +0000
commitcfbab5fe76f8011bc8b6b895b2d3bfff4ea167b3 (patch)
tree51abb49a04c9797e7def9c8929e8f427037c61ed /src/buildstream/plugin.py
parentb60fffebf563edfe258cbb893754197af1ac5a0b (diff)
downloadbuildstream-cfbab5fe76f8011bc8b6b895b2d3bfff4ea167b3.tar.gz
Refactor, use context.messenger directly
Instead of having methods in Context forward calls on to the Messenger, have folks call the Messenger directly. Remove the forwarding methods in Context.
Diffstat (limited to 'src/buildstream/plugin.py')
-rw-r--r--src/buildstream/plugin.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py
index a12ff61ec..de969c267 100644
--- a/src/buildstream/plugin.py
+++ b/src/buildstream/plugin.py
@@ -657,10 +657,10 @@ class Plugin():
# This will raise SourceError on its own
self.call(... command which takes time ...)
"""
- with self.__context.timed_activity(activity_name,
- unique_id=self._unique_id,
- detail=detail,
- silent_nested=silent_nested):
+ with self.__context.messenger.timed_activity(activity_name,
+ unique_id=self._unique_id,
+ detail=detail,
+ silent_nested=silent_nested):
yield
def call(self, *popenargs, fail=None, fail_temporarily=False, **kwargs):
@@ -798,7 +798,7 @@ class Plugin():
#
@contextmanager
def _output_file(self):
- log = self.__context.get_log_handle()
+ log = self.__context.messenger.get_log_handle()
if log is None:
with open(os.devnull, "w") as output:
yield output
@@ -870,7 +870,7 @@ class Plugin():
def __message(self, message_type, brief, **kwargs):
message = Message(self._unique_id, message_type, brief, **kwargs)
- self.__context.message(message)
+ self.__context.messenger.message(message)
def __note_command(self, output, *popenargs, **kwargs):
workdir = kwargs.get('cwd', os.getcwd())