[core] graph: fix retrieve first submitter

This commit is contained in:
Fabien Castan 2020-12-02 01:06:04 +01:00
parent 1102ce84e0
commit a0206a85fc

View file

@ -374,7 +374,8 @@ class TaskManager(BaseObject):
sub = meshroom.core.submitters.get(submitter, None) sub = meshroom.core.submitters.get(submitter, None)
elif len(meshroom.core.submitters) == 1: elif len(meshroom.core.submitters) == 1:
# if only one submitter available use it # if only one submitter available use it
sub = list(meshroom.core.submitters.values())[0] allSubmitters = meshroom.core.submitters.values()
sub = next(iter(allSubmitters)) # retrieve the first element
if sub is None: if sub is None:
# Warning: Syntax and terms are parsed on QML side to recognize the error # Warning: Syntax and terms are parsed on QML side to recognize the error
# Syntax : [Context] ErrorType: ErrorMessage # Syntax : [Context] ErrorType: ErrorMessage