Simplified the flattening for the lists returned by plugins on the import_task_created event.

This commit is contained in:
Malte Ried 2015-02-03 12:15:17 +01:00
parent e681449785
commit 11b446e7df

View file

@ -556,11 +556,8 @@ class ImportTask(object):
if not tasks:
tasks = [self]
else:
# The plugins gave us a list of lists of task. Flatten it.
flat_tasks = []
for inner in tasks:
flat_tasks += inner
tasks = [t for t in flat_tasks if t]
# The plugins gave us a list of lists of tasks. Flatten it.
tasks = [t for inner in tasks for t in inner]
return tasks
def lookup_candidates(self):