aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-01-07 15:28:37 +0100
committerPawel Wieczorek <p.wieczorek2@samsung.com>2020-01-07 15:28:37 +0100
commite7c5ed589026a6629a219b71b35e8a20036bc94a (patch)
treefc9d424639094faf776c0bd594cf837a5671e864
parent5aed5e739f2d78756d0f6a4c1d995f627565f8ae (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>
-rwxr-xr-xbootstrap/codesearch/create_config.py12
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():