FIX: don't check if elementes are older than 30 days if all module check
This commit is contained in:
@ -21,14 +21,14 @@ def asciidoc_json_dump(list, name, steps, Pmodules_db_path):
|
|||||||
if name != "all":
|
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()
|
||||||
for elem in matrix_db:
|
for elem in matrix_db:
|
||||||
if (
|
if (
|
||||||
datetime.strptime(elem[-1], "%Y-%m-%d") + timedelta(days=30)
|
datetime.strptime(elem[-1], "%Y-%m-%d") + timedelta(days=30)
|
||||||
< datetime.now()
|
< datetime.now()
|
||||||
):
|
):
|
||||||
temp_matrix_db.remove(elem)
|
temp_matrix_db.remove(elem)
|
||||||
matrix_db = temp_matrix_db
|
matrix_db = temp_matrix_db
|
||||||
|
|
||||||
# Update the database for new changes
|
# Update the database for new changes
|
||||||
if len(list) != 0:
|
if len(list) != 0:
|
||||||
|
Reference in New Issue
Block a user