Skip to content

Commit

Permalink
[processing] Fix python runAlgorithm when algorithm has missing optio…
Browse files Browse the repository at this point in the history
…nal outputs
  • Loading branch information
nyalldawson committed Apr 9, 2018
1 parent 60efbb5 commit ee185cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/processing/core/Processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=No
else:
# auto convert layer references in results to map layers
for out in alg.outputDefinitions():
if out.name() not in results:
continue

if isinstance(out, (QgsProcessingOutputVectorLayer, QgsProcessingOutputRasterLayer, QgsProcessingOutputMapLayer)):
result = results[out.name()]
if not isinstance(result, QgsMapLayer):
Expand Down
Binary file not shown.

0 comments on commit ee185cc

Please sign in to comment.