mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
[processing][grass] Fix incorrect path calculation for grass binary
This commit is contained in:
parent
bec878f6f9
commit
8e08bda46c
@ -140,14 +140,12 @@ class Grass7Utils:
|
|||||||
Inline function to search for grass binaries into a folder
|
Inline function to search for grass binaries into a folder
|
||||||
with os.walk
|
with os.walk
|
||||||
"""
|
"""
|
||||||
command = None
|
|
||||||
if os.path.exists(folder):
|
if os.path.exists(folder):
|
||||||
for root, dirs, files in os.walk(folder):
|
for root, dirs, files in os.walk(folder):
|
||||||
for cmd in cmdList:
|
for cmd in cmdList:
|
||||||
if cmd in files:
|
if cmd in files:
|
||||||
command = os.path.join(root, cmd)
|
return os.path.join(root, cmd)
|
||||||
break
|
return None
|
||||||
return command
|
|
||||||
|
|
||||||
if Grass7Utils.command:
|
if Grass7Utils.command:
|
||||||
return Grass7Utils.command
|
return Grass7Utils.command
|
||||||
|
Loading…
x
Reference in New Issue
Block a user