Skip to content

Commit 8e08bda

Browse files
committed
[processing][grass] Fix incorrect path calculation for grass binary
1 parent bec878f commit 8e08bda

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/plugins/processing/algs/grass7/Grass7Utils.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,12 @@ def searchFolder(folder):
140140
Inline function to search for grass binaries into a folder
141141
with os.walk
142142
"""
143-
command = None
144143
if os.path.exists(folder):
145144
for root, dirs, files in os.walk(folder):
146145
for cmd in cmdList:
147146
if cmd in files:
148-
command = os.path.join(root, cmd)
149-
break
150-
return command
147+
return os.path.join(root, cmd)
148+
return None
151149

152150
if Grass7Utils.command:
153151
return Grass7Utils.command

0 commit comments

Comments
 (0)