summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2018-10-23 15:43:41 +0100
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2018-10-25 15:43:52 +0100
commit95adf09e6e66b3eb9fe53c816450ae3273963bd4 (patch)
tree29e30f9299798430e08eb04a802cba86a74911d5 /buildstream
parentd2743c52262ff647c02f13334aa0b9c93bf45c19 (diff)
downloadbuildstream-95adf09e6e66b3eb9fe53c816450ae3273963bd4.tar.gz
_variables.py: Fix lint issue in `find_recursive_variable`
The python `for`/`else` construct only makes sense if the `for` loop body has a `break` statement. Otherwise the use of `else` causes pylint to raise an error. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_variables.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_variables.py b/buildstream/_variables.py
index 1a52b5680..95b80cc08 100644
--- a/buildstream/_variables.py
+++ b/buildstream/_variables.py
@@ -191,8 +191,8 @@ def find_recursive_variable(variable, matched_variables, all_vars):
for key, value in zip(matched_variables, matched_values):
if _wrap_variable(variable) in value:
return key
- else:
- return None
+ # We failed to find a recursive variable
+ return None
def _wrap_variable(var):