FIX: no deep copy for list_no_state lists

This commit is contained in:
germann_e 2023-08-23 13:46:17 +02:00
parent 6177e41be4
commit 4fabebf7ce

View File

@ -102,9 +102,13 @@ def db_check_diff(current_pmodule_state, Pmodules_db_path, Pmodules_states):
)
old_db = set(" ".join(i.split()) for i in old_pmodule_state.splitlines())
all_module_list = list(current_db)
all_module_list_sorted = sorted([x for x in all_module_list if 'stable' in x])
all_module_list_sorted += sorted([x for x in all_module_list if 'unstable' in x])
all_module_list_sorted += sorted([x for x in all_module_list if 'deprecated' in x])
all_module_list_sorted = sorted([x for x in all_module_list if "stable" in x])
all_module_list_sorted += sorted(
[x for x in all_module_list if "unstable" in x]
)
all_module_list_sorted += sorted(
[x for x in all_module_list if "deprecated" in x]
)
all_module_list = all_module_list_sorted
# We have to check the differences between the pmodule states.
@ -151,14 +155,14 @@ def print_pmodules_differences(
changed_module_list = []
# Replace the state of the modules with * for Regex comparison
new_module_list_no_state = new_module_list.copy()
deleted_module_list_no_state = deleted_module_list.copy()
new_module_list_no_state = []
deleted_module_list_no_state = []
for state in Pmodules_states:
new_module_list_no_state = [
diff.replace(state, ".*") for diff in new_module_list_no_state
diff.replace(state, ".*") for diff in new_module_list
]
deleted_module_list_no_state = [
diff.replace(state, ".*") for diff in deleted_module_list_no_state
diff.replace(state, ".*") for diff in deleted_module_list
]
# Check if the state of the module is the only thing that changed