INNER CODE UNIT · Python

sort_menu_by_priority

mitre-attack/attack-website · modules/__init__.py:9

def sort_menu_by_priority():
    global menu_ptr
    menu_ptr = sorted(menu_ptr, key=lambda k: k["priority"])


def sort_run_ptr_by_priority():
    global run_ptr
    run_ptr = sorted(run_ptr, key=lambda k: k["priority"])


def check_redirections(redirections_list):
    global master_redirections_dict

    for redirection in redirections_list:
        # If master list already has from redirection
        if master_redirections_dict.get(redirection["from"]):
            # Check if it redirects to the same link, otherwise it is a conflict
            if master_redirections_dict[redirection["from"]] != redirection["to"]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…