summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2018-08-21 12:43:41 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2018-08-21 12:43:41 +0000
commit3a4c147a9096e02f57c6057e0744e0c5c4d50fd2 (patch)
treece0d98b100a89b09b94f0c84136cc030d1c3156c
parent4cab18e3e90d990eb1f9f0ff2795c9dc12c7dbaf (diff)
parentf3fbdac0afa562e60a01caf0c57ad2d148f22e43 (diff)
downloadbuildstream-3a4c147a9096e02f57c6057e0744e0c5c4d50fd2.tar.gz
Merge branch 'jonathan/faster-except-elements' into 'master'
Pipeline: Skip except_elements logic if no elements to except See merge request BuildStream/buildstream!688
-rw-r--r--buildstream/_pipeline.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index cc462c21a..4e5f4d0e9 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -235,6 +235,9 @@ class Pipeline():
# exceptions removed
#
def except_elements(self, targets, elements, except_targets):
+ if not except_targets:
+ return elements
+
targeted = list(self.dependencies(targets, Scope.ALL))
visited = []