Skip to content
Permalink
Browse files

[processing] fix broken stdout handling in GRASS algs (fix #21142)

  • Loading branch information
alexbruy committed Jan 31, 2019
1 parent a911ef3 commit b9f559ee0430e09d8e1a3b70e060155635080262
@@ -631,15 +631,13 @@ def processCommand(self, parameters, context, feedback, delOutputs=False):
if outName in parameters and parameters[outName] is not None:
# for HTML reports, we need to redirect stdout
if out.defaultFileExtension().lower() == 'html':
command += ' > "{}"'.format(
self.parameterAsFileOutput(
parameters, outName, context)
)
command += ' {}=- > "{}"'.format(
outName,
self.parameterAsFileOutput(parameters, outName, context))
else:
command += ' {}="{}"'.format(
outName,
self.parameterAsFileOutput(
parameters, outName, context))
self.parameterAsFileOutput(parameters, outName, context))
# For folders destination
elif isinstance(out, QgsProcessingParameterFolderDestination):
# We need to add a unique temporary basename
@@ -10,5 +10,5 @@ QgsProcessingParameterNumber|threshold|Threshold for connecting centers to the n
*QgsProcessingParameterField|arc_backward_column|Arc backward direction cost column (number)|None|input|0|False|True
*QgsProcessingParameterBoolean|-g|Use geodesic calculation for longitude-latitude locations|False|True
QgsProcessingParameterVectorDestination|output|Network_Salesman
QgsProcessingParameterFileDestination|sequence|Output file holding node sequence|Html files (*.html)|report.html|True
QgsProcessingParameterFileDestination|sequence|Output file holding node sequence|CSV files (*.csv)|None|True

@@ -0,0 +1,4 @@
sequence;category;cost_to_next
1;1;0.000
2;2;0.000
3;3;0.000
@@ -280,6 +280,9 @@ tests:
output:
name: expected/grass7/v_net_salesman.shp
type: vector
sequence:
name: expected/grass7/v_net_salesman_seq.csv
type: file

- algorithm: grass7:v.net.steiner
name: v.net.steiner

0 comments on commit b9f559e

Please sign in to comment.
You can’t perform that action at this time.