diff --git a/python/plugins/processing/algs/grass/GrassUtils.py b/python/plugins/processing/algs/grass/GrassUtils.py index 6b86c4c39be..9d90d40324f 100644 --- a/python/plugins/processing/algs/grass/GrassUtils.py +++ b/python/plugins/processing/algs/grass/GrassUtils.py @@ -86,7 +86,7 @@ class GrassUtils: 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: @@ -110,7 +110,7 @@ class GrassUtils: @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: diff --git a/python/plugins/processing/algs/grass7/Grass7Utils.py b/python/plugins/processing/algs/grass7/Grass7Utils.py index f9e7c168b79..291b4bc02eb 100644 --- a/python/plugins/processing/algs/grass7/Grass7Utils.py +++ b/python/plugins/processing/algs/grass7/Grass7Utils.py @@ -83,7 +83,7 @@ class Grass7Utils: 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: diff --git a/python/plugins/processing/algs/otb/OTBUtils.py b/python/plugins/processing/algs/otb/OTBUtils.py index 558aae68057..4a2838b1b58 100644 --- a/python/plugins/processing/algs/otb/OTBUtils.py +++ b/python/plugins/processing/algs/otb/OTBUtils.py @@ -101,24 +101,15 @@ def findOtbLibPath(): def otbLibPath(): - folder = ProcessingConfig.getSetting(OTB_LIB_FOLDER) - if folder is None: - 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():