Skip to content

Commit

Permalink
[Processing] Display CSV OutputFile
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Mar 22, 2018
1 parent f281ff5 commit 2d3a097
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/plugins/processing/gui/Postprocessing.py
Expand Up @@ -44,6 +44,7 @@
from processing.core.outputs import OutputRaster
from processing.core.outputs import OutputVector
from processing.core.outputs import OutputTable
from processing.core.outputs import OutputFile
from processing.core.outputs import OutputHTML

from processing.tools import dataobjects
Expand Down Expand Up @@ -78,6 +79,15 @@ def handleAlgorithmResults(alg, progress=None, showResults=True):
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
"Error loading result layer:\n" + traceback.format_exc())
wrongLayers.append(out.description)
elif isinstance(out, OutputFile) and out.ext == 'csv':
try:
dataobjects.load(out.value, name, alg.crs,
RenderingStyles.getStyle(alg.commandLineName(),
out.name))
except Exception:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
"Error loading result layer:\n" + traceback.format_exc())
wrongLayers.append(out.description)
elif isinstance(out, OutputHTML):
ProcessingResults.addResult(out.description, out.value)
htmlResults = True
Expand Down

0 comments on commit 2d3a097

Please sign in to comment.