diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2020-01-07 15:28:37 +0100 |
---|---|---|
committer | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2020-01-07 15:28:37 +0100 |
commit | e7c5ed589026a6629a219b71b35e8a20036bc94a (patch) | |
tree | fc9d424639094faf776c0bd594cf837a5671e864 /bootstrap/codesearch | |
parent | 5aed5e739f2d78756d0f6a4c1d995f627565f8ae (diff) |
Drop dictionary comprehension from repository list creation
Complex is better than complicated.
Issue-ID: ONAPARC-540
Change-Id: I6dbc03166496049e92ff9401450b3ac563b3fb38
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'bootstrap/codesearch')
-rwxr-xr-x | bootstrap/codesearch/create_config.py | 12 |
1 files changed, 11 insertions, 1 deletions
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(): |