mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 10:32:34 +01:00
pipeline: allow non-generator iterators
This commit is contained in:
parent
74a661696e
commit
3de2b7f090
1 changed files with 3 additions and 3 deletions
|
|
@ -304,11 +304,11 @@ class Pipeline(object):
|
|||
raise ValueError('pipeline must have at least two stages')
|
||||
self.stages = []
|
||||
for stage in stages:
|
||||
if isinstance(stage, types.GeneratorType):
|
||||
if isinstance(stage, (list, tuple)):
|
||||
self.stages.append(stage)
|
||||
else:
|
||||
# Default to one thread per stage.
|
||||
self.stages.append((stage,))
|
||||
else:
|
||||
self.stages.append(stage)
|
||||
|
||||
def run_sequential(self):
|
||||
"""Run the pipeline sequentially in the current thread. The
|
||||
|
|
|
|||
Loading…
Reference in a new issue