mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 10:52:03 +02:00
[core] Graph.findNode: if multiple candidates, do not raise an error if one is the exact input
This commit is contained in:
parent
0345672b34
commit
c8978cd792
1 changed files with 3 additions and 0 deletions
|
@ -569,6 +569,9 @@ class Graph(BaseObject):
|
|||
if not candidates:
|
||||
raise KeyError('No node candidate for "{}"'.format(nodeExpr))
|
||||
if len(candidates) > 1:
|
||||
for c in candidates:
|
||||
if c.name == nodeExpr:
|
||||
return c
|
||||
raise KeyError('Multiple node candidates for "{}": {}'.format(nodeExpr, str([c.name for c in candidates])))
|
||||
return candidates[0]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue