summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-14 17:25:33 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-21 11:53:11 +0100
commit461a0588175b415a89849f7f6c35cf83f94acfc1 (patch)
tree978d068aee878808780239f9aef639f1cd0f4e80
parent662c729fa32489312beed6318956ba9ce94e685f (diff)
downloadbuildstream-461a0588175b415a89849f7f6c35cf83f94acfc1.tar.gz
element.py: Remove early warning and check directory is not None
The check for directory should have always been here. The early warning test doesn't work for `bst checkout` because caches haven't been configured at the point of the test, so I've had to remove it.
-rw-r--r--buildstream/element.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 6bc400bb9..602bf01cc 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2137,14 +2137,11 @@ class Element(Plugin):
project = self._get_project()
platform = Platform.get_platform()
- if self.__remote_execution_url and self.BST_VIRTUAL_DIRECTORY:
- if not self.__artifacts.has_push_remotes(element=self):
- # Give an early warning if remote execution will not work
- raise ElementError("Artifact {} is configured to use remote execution but has no push remotes. "
- .format(self.name) +
- "The remote artifact server(s) may not be correctly configured or contactable.")
-
- self.info("Using a remote sandbox for artifact {}".format(self.name))
+ if (directory is not None and
+ self.__remote_execution_url and
+ self.BST_VIRTUAL_DIRECTORY):
+
+ self.info("Using a remote sandbox for artifact {} with directory '{}'".format(self.name, directory))
sandbox = SandboxRemote(context, project,
directory,