Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[processing] fix path handling (fix #14432)
(cherry picked from commit e873540)
Conflicts:
python/plugins/processing/algs/otb/OTBUtils.py
- Loading branch information
|
@@ -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(): |
|
|