From dfff0abc1c4dea2c923c9bfdcafcb46d3d195d57 Mon Sep 17 00:00:00 2001 From: Germann Elsa Sylvia Date: Tue, 28 Mar 2023 15:23:07 +0200 Subject: [PATCH] FIX: reappending forever the all modules database --- pmodules_tools/db_diff/check.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pmodules_tools/db_diff/check.py b/pmodules_tools/db_diff/check.py index 665275cd..4a135e7f 100644 --- a/pmodules_tools/db_diff/check.py +++ b/pmodules_tools/db_diff/check.py @@ -12,12 +12,15 @@ from pytablewriter import AsciiDocTableWriter def asciidoc_json_dump(list, name, steps, Pmodules_db_path): matrix = [] matrix_db = [] + temp_matrix_db = [] # Check the existing database db_file = os.path.join(Pmodules_db_path, name + "_modules.json") if os.path.exists(db_file): - with open(db_file, "r") as f: - matrix_db = json.load(f) + # No need to append the old database if we check the whole database + if name != "all": + with open(db_file, "r") as f: + matrix_db = json.load(f) temp_matrix_db = matrix_db.copy() for elem in matrix_db: if (