Skip to content

Commit ee185cc

Browse files
committedApr 9, 2018
[processing] Fix python runAlgorithm when algorithm has missing optional outputs
1 parent 60efbb5 commit ee185cc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
 

‎python/plugins/processing/core/Processing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=No
162162
else:
163163
# auto convert layer references in results to map layers
164164
for out in alg.outputDefinitions():
165+
if out.name() not in results:
166+
continue
167+
165168
if isinstance(out, (QgsProcessingOutputVectorLayer, QgsProcessingOutputRasterLayer, QgsProcessingOutputMapLayer)):
166169
result = results[out.name()]
167170
if not isinstance(result, QgsMapLayer):
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.