mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-01 10:21:59 +02:00
[core] submitters: if there is only one submitter, use it!
More explicit error messages when the submitter is not found.
This commit is contained in:
parent
3e483ea139
commit
9d8e3648b2
1 changed files with 8 additions and 2 deletions
|
@ -1150,9 +1150,15 @@ def submitGraph(graph, submitter, toNodes=None):
|
|||
logging.info("Nodes to process: {}".format(edgesToProcess))
|
||||
logging.info("Edges to process: {}".format(edgesToProcess))
|
||||
|
||||
sub = meshroom.core.submitters.get(submitter, None)
|
||||
sub = None
|
||||
if submitter:
|
||||
sub = meshroom.core.submitters.get(submitter, None)
|
||||
elif len(meshroom.core.submitters) == 1:
|
||||
# if only one submitter available use it
|
||||
sub = meshroom.core.submitters.values()[0]
|
||||
if sub is None:
|
||||
raise RuntimeError("Unknown Submitter : " + submitter)
|
||||
raise RuntimeError("Unknown Submitter: '{submitter}'. Available submitters are: '{allSubmitters}'.".format(
|
||||
submitter=submitter, allSubmitters=str(meshroom.core.submitters.keys())))
|
||||
|
||||
try:
|
||||
res = sub.submit(nodesToProcess, edgesToProcess, graph.filepath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue