Skip to content
Permalink
Browse files

processing: base grass path on OSGEO4W_ROOT where available

  • Loading branch information
jef-n authored and j08lue committed Jun 8, 2016
1 parent d708473 commit 62b9cc0176e6f591cac4247f32fe31553292940f
@@ -91,11 +91,14 @@ def grassPath():
folder = None
if folder is None:
if isWindows():
testfolder = os.path.dirname(QgsApplication.prefixPath())
if "OSGEO4W_ROOT" in environ:
testfolder = os.path.join(unicode(environ['OSGEO4W_ROOT']), "apps", "grass")
else:
testfolder = unicode(QgsApplication.prefixPath())
testfolder = os.path.join(testfolder, 'grass')
if os.path.isdir(testfolder):
for subfolder in os.listdir(testfolder):
if subfolder.startswith('grass'):
if subfolder.startswith('grass-6'):
folder = os.path.join(testfolder, subfolder)
break
else:
@@ -88,7 +88,10 @@ def grassPath():
folder = None
if folder is None:
if isWindows():
testfolder = os.path.dirname(unicode(QgsApplication.prefixPath()))
if "OSGEO4W_ROOT" in environ:
testfolder = os.path.join(unicode(environ['OSGEO4W_ROOT']), "apps", "grass")
else:
testfolder = unicode(QgsApplication.prefixPath())
testfolder = os.path.join(testfolder, 'grass')
if os.path.isdir(testfolder):
for subfolder in os.listdir(testfolder):

0 comments on commit 62b9cc0

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