Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] better output logging for gdal/org calls
Fixes #11501
  • Loading branch information
volaya committed Nov 21, 2014
1 parent f3fdd9c commit 51de0ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/gdal/GdalUtils.py
Expand Up @@ -69,15 +69,17 @@ def runGdal(commands, progress):
loglines = []
loglines.append('GDAL execution console output')
fused_command = ''.join(['%s ' % c for c in commands])
print fused_command
proc = subprocess.Popen(
fused_command,
shell=True,
stdout=subprocess.PIPE,
stdin=open(os.devnull),
stderr=subprocess.STDOUT,
universal_newlines=False,
universal_newlines=True,
).stdout
for line in iter(proc.readline, ''):
print line
loglines.append(line)
ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
GdalUtils.consoleOutput = loglines
Expand Down

0 comments on commit 51de0ca

Please sign in to comment.