You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/10/31 12:18:42 UTC

[incubator-ponymail-foal] branch master updated: Don't reuse variable name

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c370fd  Don't reuse variable name
3c370fd is described below

commit 3c370fde71635cfdc7d6ad79792c0a39a54de249
Author: Sebb <se...@apache.org>
AuthorDate: Sun Oct 31 12:18:30 2021 +0000

    Don't reuse variable name
---
 tools/setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/setup.py b/tools/setup.py
index 8038d11..40e1a10 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -72,8 +72,8 @@ def create_indices():
     print(f"Creating indices {dbname}-*...")
 
     settings = {"number_of_shards": shards, "number_of_replicas": replicas}
-    mappings = yaml.safe_load(open("mappings.yaml", "r"))
-    for index, mappings in mappings.items():
+    mapping_file = yaml.safe_load(open("mappings.yaml", "r"))
+    for index, mappings in mapping_file.items():
         res = es.indices.create(
             index=f"{dbname}-{index}", body={"mappings": mappings, "settings": settings}
         )