Merge branch 'fix_appending_all_modules' into 'master'
FIX: reappending forever the all modules database See merge request Pmodules/Pmodules_tools!17
This commit is contained in:
commit
a5a84d4345
@ -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 (
|
||||
|
Loading…
x
Reference in New Issue
Block a user