Skip to content

Commit

Permalink
fix command launching for otb and gdal
Browse files Browse the repository at this point in the history
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@83 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
julien.malik@gmail.com committed Apr 13, 2012
1 parent fef55d0 commit c4d2171
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/sextante/gdal/GdalUtils.py
Expand Up @@ -19,7 +19,8 @@ def runGdal(commands, progress):
os.putenv( "PATH", envval )
loglines = []
loglines.append("GDAL execution console output")
proc = subprocess.Popen(commands, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=False).stdout
fused_command = ''.join(['%s ' % c for c in commands])
proc = subprocess.Popen(fused_command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=False).stdout
for line in iter(proc.readline, ""):
loglines.append(line)
SextanteLog.addToLog(SextanteLog.LOG_INFO, loglines)
Expand Down
4 changes: 1 addition & 3 deletions src/sextante/otb/OTBUtils.py
Expand Up @@ -34,9 +34,7 @@ def executeOtb(commands, progress):
loglines = []
loglines.append("OTB execution console output")
os.putenv('ITK_AUTOLOAD_PATH', OTBUtils.otbLibPath())
fused_command = ''
for c in commands:
fused_command += c + ' '
fused_command = ''.join(['%s ' % c for c in commands])
proc = subprocess.Popen(fused_command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=True).stdout
for line in iter(proc.readline, ""):
if "[*" in line:
Expand Down

0 comments on commit c4d2171

Please sign in to comment.