Skip to content

Commit ec6bc59

Browse files
committed
Use list comprehension for filter
In python3, 'filter' returns an interable which doesn't support using 'len()'. This switches to a list comprehension, so that we can check the length of 'enabled_pipeline'. This is required to move build-script to Python3.
1 parent 0b74cb1 commit ec6bc59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/swift_build_support/swift_build_support/productpipeline_list_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def infer(self):
141141

142142
# Filter out any of the pipelines that before inference were not
143143
# selected.
144-
enabled_pipeline = filter(lambda x: x is not None, pipeline)
144+
enabled_pipeline = [p for p in pipeline if p is not None]
145145

146146
if self.args.verbose_build:
147147
print("-- Build Graph Inference --")

0 commit comments

Comments
 (0)