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,10 +12,13 @@ from pytablewriter import AsciiDocTableWriter
|
|||||||
def asciidoc_json_dump(list, name, steps, Pmodules_db_path):
|
def asciidoc_json_dump(list, name, steps, Pmodules_db_path):
|
||||||
matrix = []
|
matrix = []
|
||||||
matrix_db = []
|
matrix_db = []
|
||||||
|
temp_matrix_db = []
|
||||||
|
|
||||||
# Check the existing database
|
# Check the existing database
|
||||||
db_file = os.path.join(Pmodules_db_path, name + "_modules.json")
|
db_file = os.path.join(Pmodules_db_path, name + "_modules.json")
|
||||||
if os.path.exists(db_file):
|
if os.path.exists(db_file):
|
||||||
|
# No need to append the old database if we check the whole database
|
||||||
|
if name != "all":
|
||||||
with open(db_file, "r") as f:
|
with open(db_file, "r") as f:
|
||||||
matrix_db = json.load(f)
|
matrix_db = json.load(f)
|
||||||
temp_matrix_db = matrix_db.copy()
|
temp_matrix_db = matrix_db.copy()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user