summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2018-08-20 18:14:51 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2018-08-20 18:14:51 +0100
commit8eb198c393f85db9b2e74b3f8703c9fa12615eec (patch)
treed44ed4e5ec9aa7d6848c672911e8483038fdd4b3
parent92e34ccd2bfdb09f3c6d16e974d1c5fb78ac0516 (diff)
downloadbuildstream-jonathan/faster-except-elements.tar.gz
Pipeline: Skip except_elements logic if no elements to exceptjonathan/faster-except-elements
-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 = []