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 (