def __init__(self, fetch_event, fetch_since, fetch_photos, username, password, progress, batch): tasks = [LoginTask(username, password)] if fetch_event: tasks.append(ReportTask(fetch_event, fetch_since, progress)) if fetch_photos != 'none': tasks.append(PhotosTask(progress, fetch_photos, batch)) broken_registrations = Registration.by_category('') if broken_registrations: tasks.append(CategoryTask(progress, list(broken_registrations), batch)) tasks.append(BatchFinishTask(progress, batch)) TaskList.__init__(self, tasks)