islice's don't have length+can only be iterated once
Small bug: use if islice
caused a crash here: https://gitlab.cern.ch/cp3-cms/bamboo/blob/b9636d03177261eb6e07e508c4156365ffc148e3/bamboo/batch.py#L331 (they don't have a length)
Also, they can be iterated only once, so after calling sorted()
on them, fileList
ends up empty.
(there are many iterators in the code and I find this behaviour can cause hard-to-find bugs...)