From e7c5ed589026a6629a219b71b35e8a20036bc94a Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Tue, 7 Jan 2020 15:28:37 +0100 Subject: Drop dictionary comprehension from repository list creation Complex is better than complicated. Issue-ID: ONAPARC-540 Change-Id: I6dbc03166496049e92ff9401450b3ac563b3fb38 Signed-off-by: Pawel Wieczorek --- bootstrap/codesearch/create_config.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap/codesearch/create_config.py b/bootstrap/codesearch/create_config.py index 604338fd8..def4b3ecd 100755 --- a/bootstrap/codesearch/create_config.py +++ b/bootstrap/codesearch/create_config.py @@ -28,7 +28,17 @@ def get_projects_list(): def create_repos_list(projects): """Create a map of all projects to their repositories' URLs.""" - return {p: {"url": "{}/{}".format(ONAP_CGIT, p), "url-pattern": {"base-url": "{url}/tree/{path}{anchor}", "anchor": "#n{line}"}} for p in projects} + repos_list = {} + for project in projects: + repos_list[project] = { + "url": "{}/{}".format(ONAP_CGIT, project), + "url-pattern": { + "base-url": "{url}/tree/{path}{anchor}", + "anchor": "#n{line}" + } + } + + return repos_list def main(): -- cgit 1.2.3-korg