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-swift to Python3.