Skip to content
Permalink
Browse files
[Processing] Avoid consecutive quotes when calling OTB algorithms.
  • Loading branch information
radosuav committed Apr 7, 2015
1 parent 12d7cfc commit f94d92f014b090c3d12731b26e28ccef5b4e5d82
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 f94d92f

Please sign in to comment.