Skip to content

Commit

Permalink
[processing][grass] Fix incorrect path calculation for grass binary
Browse files Browse the repository at this point in the history
(cherry-picked from 8e08bda)
  • Loading branch information
nyalldawson committed Apr 2, 2018
1 parent 8804724 commit 9b8441e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/plugins/processing/algs/grass7/Grass7Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ def searchFolder(folder):
Inline function to search for grass binaries into a folder
with os.walk
"""
command = None
if os.path.exists(folder):
for root, dirs, files in os.walk(folder):
for cmd in cmdList:
if cmd in files:
command = os.path.join(root, cmd)
break
return command
return os.path.join(root, cmd)
return None

if Grass7Utils.command:
return Grass7Utils.command
Expand Down

0 comments on commit 9b8441e

Please sign in to comment.