Skip to content
Permalink
Browse files
[processing] Extra check to ensure GRASS folder setting not already None
- Update to 5131e93; not sure why ProcessingConfig.getSetting returning
  None sets folder = None instead of '' (on the previous line on Win)
  • Loading branch information
dakcarto committed Apr 26, 2016
1 parent 4c02997 commit 36a820e51657bf0c3069e1fd287d6b452a3cd1e0
Showing with 3 additions and 3 deletions.
  1. +2 −2 python/plugins/processing/algs/grass/GrassUtils.py
  2. +1 −1 python/plugins/processing/algs/grass7/Grass7Utils.py
@@ -87,7 +87,7 @@ def grassPath():
return ''

folder = ProcessingConfig.getSetting(GrassUtils.GRASS_FOLDER) or ''
if not os.path.exists(folder):
if folder and not os.path.exists(folder):
folder = None
if folder is None:
if isWindows():
@@ -111,7 +111,7 @@ def grassPath():
@staticmethod
def grassWinShell():
folder = ProcessingConfig.getSetting(GrassUtils.GRASS_WIN_SHELL) or ''
if not os.path.exists(folder):
if folder and not os.path.exists(folder):
folder = None
if folder is None:
folder = os.path.dirname(unicode(QgsApplication.prefixPath()))
@@ -84,7 +84,7 @@ def grassPath():
return ''

folder = ProcessingConfig.getSetting(Grass7Utils.GRASS_FOLDER) or ''
if not os.path.exists(folder):
if folder and not os.path.exists(folder):
folder = None
if folder is None:
if isWindows():

0 comments on commit 36a820e

Please sign in to comment.