From 8e08bda46c2ec2692f5c07347cb1b947d68bb63f Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 26 Mar 2018 16:22:44 +1000 Subject: [PATCH] [processing][grass] Fix incorrect path calculation for grass binary --- python/plugins/processing/algs/grass7/Grass7Utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/plugins/processing/algs/grass7/Grass7Utils.py b/python/plugins/processing/algs/grass7/Grass7Utils.py index 644815d3948..6bf9f295b56 100644 --- a/python/plugins/processing/algs/grass7/Grass7Utils.py +++ b/python/plugins/processing/algs/grass7/Grass7Utils.py @@ -140,14 +140,12 @@ class Grass7Utils: 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