[processing] fixed handling output html files in grass 7

This commit is contained in:
volaya 2015-10-14 13:23:44 +02:00
parent 68ebd4bc7b
commit 2f9db5adef
2 changed files with 4 additions and 3 deletions

View File

@ -105,6 +105,4 @@ In some cases, it might be interesting to take the console output from GRASS and
extract a part of it for saving or formatting.
To do this, just add an output of type OutputHTML. Processing will take care of
turning that into 2 output, one of type OutputHTML and another one of type OutputFile.
The second one will contain the raw output of the algorithm, while the first one
will have some HTML formatting
sending the console output to that output file

View File

@ -139,6 +139,9 @@ class Grass7Algorithm(GeoAlgorithm):
hasRasterOutput = True
elif isinstance(output, OutputVector):
vectorOutputs += 1
if isinstance(output, OutputHTML):
self.addOutput(OutputFile("rawoutput", output.description +
" (raw output)", "txt"))
line = lines.readline().strip('\n').strip()
except Exception as e:
ProcessingLog.addToLog(