summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2018-08-22 06:51:51 +0000
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-08-22 06:51:51 +0000
commit1d48dee98225189ee6868700ca4838577c1abe4c (patch)
treec5781ae92555f2e2cbb50134a202a4d8087e89c1
parentfc3cff95f480e91644cbefa96d95ff0978fe0cfa (diff)
parent6f6a04a9c7daea48e4d4782b09bf197cbc41c1a6 (diff)
downloadbuildstream-1d48dee98225189ee6868700ca4838577c1abe4c.tar.gz
Merge branch 'jonathan/faster-except-elements-1.2' into 'bst-1.2'
Pipeline: Skip except_elements logic if no elements to except See merge request BuildStream/buildstream!691
-rw-r--r--buildstream/_pipeline.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index 2d3194f6b..3b9fb0de9 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 = []