Skip to content

Commit 2f9db5a

Browse files
committed
[processing] fixed handling output html files in grass 7
1 parent 68ebd4b commit 2f9db5a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

python/plugins/processing/algs/grass/grass.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,4 @@ In some cases, it might be interesting to take the console output from GRASS and
105105
extract a part of it for saving or formatting.
106106

107107
To do this, just add an output of type OutputHTML. Processing will take care of
108-
turning that into 2 output, one of type OutputHTML and another one of type OutputFile.
109-
The second one will contain the raw output of the algorithm, while the first one
110-
will have some HTML formatting
108+
sending the console output to that output file

python/plugins/processing/algs/grass7/Grass7Algorithm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def defineCharacteristicsFromFile(self):
139139
hasRasterOutput = True
140140
elif isinstance(output, OutputVector):
141141
vectorOutputs += 1
142+
if isinstance(output, OutputHTML):
143+
self.addOutput(OutputFile("rawoutput", output.description +
144+
" (raw output)", "txt"))
142145
line = lines.readline().strip('\n').strip()
143146
except Exception as e:
144147
ProcessingLog.addToLog(

0 commit comments

Comments
 (0)