From 8ac77027e8a4006bbbbcb7627fad41e57379a8e3 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Tue, 27 Feb 2024 15:00:04 +0100 Subject: [PATCH] Fix linter problem with function return Signed-off-by: Jose Luis Rivero --- plugins/repository.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/repository.py b/plugins/repository.py index 6db0ed1..5164edb 100644 --- a/plugins/repository.py +++ b/plugins/repository.py @@ -69,14 +69,17 @@ def load_config_file(config_file_path='config/repository.yaml'): def load_project(project, config): + ret = [] for p in config['projects']: pattern = re.compile(p['name']) if pattern.search(project): - return p['repositories'] - # stop in the first match + ret = p['repositories'] break - error('Unknown project: ' + project) + if not ret: + error('Unknown project: ' + project) + + return ret def get_linux_distro():