Tests/store_packs.py
def extract_modified_packs(modified_packs, packs_artifacts_path, extract_destination_path):
    """Extracts changed packs from content pack artifact zip.

    Args:
        modified_packs (set): collection of modified/new packs.
        packs_artifacts_path (str): full path to content artifacts zip file.
        extract_destination_path (str): full path to directory where to extract the packs.

    """
    print("Starting extracting modified pack:")
    with ZipFile(packs_artifacts_path) as packs_artifacts:
        for pack in packs_artifacts.namelist():
            for modified_pack in modified_packs:

                if pack.startswith(f"{modified_pack}/"):
                    packs_artifacts.extract(pack, extract_destination_path)
                    print(f"Extracted {pack} to path: {extract_destination_path}")
    print_color("Finished extracting modified packs", LOG_COLORS.GREEN)
Extracts changed packs from content pack artifact zip.

    Args:
        modified_packs (set): collection of modified/new packs.
        packs_artifacts_path (str): full path to content artifacts zip file.
        extract_destination_path (str): full path to directory where to extract the packs.

    
Extracts changed packs from content pack artifact zip.
Extracts changed packs from content pack artifact zip .
def extract_modified_packs(modified_packs, packs_artifacts_path, extract_destination_path):
    print("Starting extracting modified pack:")
    with ZipFile(packs_artifacts_path) as packs_artifacts:
        for pack in packs_artifacts.namelist():
            for modified_pack in modified_packs:
                if pack.startswith(f"{modified_pack}/"):
                    packs_artifacts.extract(pack, extract_destination_path)
                    print(f"Extracted {pack} to path: {extract_destination_path}")
    print_color("Finished extracting modified packs", LOG_COLORS.GREEN)
def extract_modified_packs ( modified_packs , packs_artifacts_path , extract_destination_path ) : print ( "Starting extracting modified pack:" ) with ZipFile ( packs_artifacts_path ) as packs_artifacts : for pack in packs_artifacts . namelist ( ) : for modified_pack in modified_packs : if pack . startswith ( f"{modified_pack}/" ) : packs_artifacts . extract ( pack , extract_destination_path ) print ( f"Extracted {pack} to path: {extract_destination_path}" ) print_color ( "Finished extracting modified packs" , LOG_COLORS . GREEN )
Extracts changed packs from content pack artifact zip.
Extracts changed packs from content pack artifact zip .
"""Extracts changed packs from content pack artifact zip.

    Args:
        modified_packs (set): collection of modified/new packs.
        packs_artifacts_path (str): full path to content artifacts zip file.
        extract_destination_path (str): full path to directory where to extract the packs.

    """
modified_packs
collection of modified/new packs.
collection of modified / new packs .
packs_artifacts_path
full path to content artifacts zip file.
full path to content artifacts zip file .
extract_destination_path
full path to directory where to extract the packs.
full path to directory where to extract the packs .