summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Smith <qinusty@gmail.com>2018-09-12 10:23:51 +0100
committerJosh Smith <qinusty@gmail.com>2018-09-19 10:25:21 +0100
commit213f77946c661d685ec6e74d5d243fbbb4549b79 (patch)
tree61013f4d95a36ac8b1c9603e539808a1c740adb7
parent198fbfe81dd38027bf12720e916cf87ca597c04a (diff)
downloadbuildstream-213f77946c661d685ec6e74d5d243fbbb4549b79.tar.gz
cascache.py: Modify messaging API calls
Both pulling and pushing INFO messages are now status messages. Calls to the messaging API through `self.context.message()` have now been switched to `element.info`.
-rw-r--r--buildstream/_artifactcache/cascache.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py
index ff47532da..840e190f1 100644
--- a/buildstream/_artifactcache/cascache.py
+++ b/buildstream/_artifactcache/cascache.py
@@ -252,11 +252,8 @@ class CASCache(ArtifactCache):
raise ArtifactError("Failed to pull artifact {}: {}".format(
element._get_brief_display_key(), e)) from e
else:
- self.context.message(Message(
- None,
- MessageType.INFO,
- "Remote ({}) does not have {} cached".format(
- remote.spec.url, element._get_brief_display_key())
+ element.info("Remote ({}) does not have {} cached".format(
+ remote.spec.url, element._get_brief_display_key()
))
return False
@@ -344,11 +341,8 @@ class CASCache(ArtifactCache):
element.info("Pushed artifact {} -> {}".format(display_key, remote.spec.url))
pushed = True
else:
- self.context.message(Message(
- None,
- MessageType.INFO,
- "Remote ({}) already has {} cached".format(
- remote.spec.url, element._get_brief_display_key())
+ element.info("Remote ({}) already has {} cached".format(
+ remote.spec.url, element._get_brief_display_key()
))
return pushed