Skip to content
Permalink
Browse files

[processing] fix path handling (fix #14432)

(cherry picked from commit e873540)

Conflicts:
	python/plugins/processing/algs/otb/OTBUtils.py
  • Loading branch information
alexbruy committed Apr 26, 2016
1 parent e657f61 commit 34336e14b6276d7a88cd68ce69f180c6c38bff0c
@@ -86,7 +86,7 @@ def grassPath():
if not isWindows() and not isMac():
return ''

folder = ProcessingConfig.getSetting(GrassUtils.GRASS_FOLDER)
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_FOLDER) or ''
if not os.path.exists(folder):
folder = None
if folder is None:
@@ -107,7 +107,7 @@ def grassPath():

@staticmethod
def grassWinShell():
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_WIN_SHELL)
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_WIN_SHELL) or ''
if not os.path.exists(folder):
folder = None
if folder is None:
@@ -83,7 +83,7 @@ def grassPath():
if not isWindows() and not isMac():
return ''

folder = ProcessingConfig.getSetting(Grass7Utils.GRASS_FOLDER)
folder = ProcessingConfig.getSetting(Grass7Utils.GRASS_FOLDER) or ''
if not os.path.exists(folder):
folder = None
if folder is None:
@@ -101,24 +101,15 @@ def findOtbLibPath():


def otbLibPath():
folder = findOtbLibPath()
if folder is None:
folder = ProcessingConfig.getSetting(OTB_LIB_FOLDER)
return folder
return ProcessingConfig.getSetting(OTB_LIB_FOLDER) or ''


def otbSRTMPath():
folder = ProcessingConfig.getSetting(OTB_SRTM_FOLDER)
if folder is None:
folder = ""
return folder
return ProcessingConfig.getSetting(OTB_SRTM_FOLDER) or ''


def otbGeoidPath():
filepath = ProcessingConfig.getSetting(OTB_GEOID_FILE)
if filepath is None:
filepath = ""
return filepath
return ProcessingConfig.getSetting(OTB_GEOID_FILE) or ''


def otbDescriptionPath():

0 comments on commit 34336e1

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