Merge pull request #4 from alexbruy/otb-indentation

fix indentation
This commit is contained in:
volaya 2016-01-15 08:21:48 +01:00
commit b68ee3d8f9
4 changed files with 7 additions and 8 deletions

View File

@ -70,8 +70,6 @@ class OTBAlgorithmProvider(AlgorithmProvider):
self.tr('Problem with OTB installation: installed OTB version (%s) is not supported' % version))
return
for descriptionFile in os.listdir(folder):
if descriptionFile.endswith("xml"):
try:
@ -111,4 +109,3 @@ class OTBAlgorithmProvider(AlgorithmProvider):
AlgorithmProvider.unload(self)
ProcessingConfig.removeSetting(OTBUtils.OTB_FOLDER)
ProcessingConfig.removeSetting(OTBUtils.OTB_LIB_FOLDER)

View File

@ -135,7 +135,7 @@ def getInstalledVersion(runOtb=False):
if _installedVersionFound and not runOtb:
return _installedVersion
commands =[os.path.join(otbPath(), "otbcli_Smoothing")]
commands = [os.path.join(otbPath(), "otbcli_Smoothing")]
progress = SilentProgress()
out = executeOtb(commands, progress, False)
for line in out:
@ -145,6 +145,7 @@ def getInstalledVersion(runOtb=False):
break
return _installedVersion
def compatibleDescriptionPath(version):
supportedVersions = {"5.0.0": "5.0.0"}
if version is None:
@ -158,7 +159,8 @@ def compatibleDescriptionPath(version):
return os.path.join(otbDescriptionPath(), supportedVersions[version])
def executeOtb(commands, progress, addToLog = True):
def executeOtb(commands, progress, addToLog=True):
loglines = []
loglines.append(tr("OTB execution console output"))
os.putenv('ITK_AUTOLOAD_PATH', otbLibPath())