Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix indentation
  • Loading branch information
alexbruy committed Jan 13, 2016
1 parent 864e192 commit b146c3e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/otb/OTBAlgorithm.py
Expand Up @@ -81,7 +81,7 @@ def help(self):
folder = OTBUtils.compatibleDescriptionPath(version)
if folder is None:
return False, None
folder = os.path.join(folder, 'doc')
folder = os.path.join(folder, 'doc')
helpfile = os.path.join(unicode(folder), self.appkey + ".html")
if os.path.exists(helpfile):
return False, helpfile
Expand Down
5 changes: 1 addition & 4 deletions python/plugins/processing/algs/otb/OTBAlgorithmProvider.py
Expand Up @@ -67,11 +67,9 @@ def _loadAlgorithms(self):
folder = OTBUtils.compatibleDescriptionPath(version)
if folder is None:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('Problem with OTB installation: installed OTB version (%s) is not supported' % version))
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:
Expand Down Expand Up @@ -111,4 +109,3 @@ def unload(self):
AlgorithmProvider.unload(self)
ProcessingConfig.removeSetting(OTBUtils.OTB_FOLDER)
ProcessingConfig.removeSetting(OTBUtils.OTB_LIB_FOLDER)

6 changes: 4 additions & 2 deletions python/plugins/processing/algs/otb/OTBUtils.py
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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())
Expand Down
Expand Up @@ -29,4 +29,4 @@
counts[clazz] += 1

for c in counts:
writer.addRecord(list(c) + [counts[c]])
writer.addRecord(list(c) + [counts[c]])

0 comments on commit b146c3e

Please sign in to comment.