Skip to content
Permalink
Browse files

Merge pull request #1976 from radosuav/otb_double_quotes

[processing] avoid consecutive quotes when calling OTB algorithms
  • Loading branch information
alexbruy committed Apr 9, 2015
2 parents 33d973f + f94d92f commit c801c503b2e72a574265490cc1e1b9d42396dcb4
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/plugins/processing/algs/otb/OTBUtils.py
@@ -29,6 +29,7 @@
__revision__ = '$Format:%H$'

import os
import re
from PyQt4.QtCore import QCoreApplication
from qgis.core import QgsApplication
import subprocess
@@ -130,7 +131,7 @@ def executeOtb(commands, progress):
loglines = []
loglines.append(OTBUtils.tr("OTB execution console output"))
os.putenv('ITK_AUTOLOAD_PATH', OTBUtils.otbLibPath())
fused_command = ''.join(['"%s" ' % c for c in commands])
fused_command = ''.join(['"%s" ' % re.sub(r'^"|"$', '', c) for c in commands])
proc = subprocess.Popen(fused_command, shell=True, stdout=subprocess.PIPE, stdin=open(os.devnull),stderr=subprocess.STDOUT, universal_newlines=True).stdout
for line in iter(proc.readline, ""):
if "[*" in line:

0 comments on commit c801c50

Please sign in to comment.
You can’t perform that action at this time.