From 461a0588175b415a89849f7f6c35cf83f94acfc1 Mon Sep 17 00:00:00 2001 From: Jim MacArthur Date: Fri, 14 Sep 2018 17:25:33 +0100 Subject: 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. --- buildstream/element.py | 13 +++++-------- 1 file 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, -- cgit v1.2.1