Skip to content

Commit

Permalink
Fix linter problem with function return
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Feb 27, 2024
1 parent 43d39db commit 8ac7702
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 8ac7702

Please sign in to comment.