From 5d99ac6d00deb5dec5f01ed648b4c8f0665c5cdf Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 16 Sep 2024 18:33:18 +0100 Subject: [PATCH] More rework and fixes --- fsutils/download_list.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/fsutils/download_list.py b/fsutils/download_list.py index 28edb31db9..9a3d8d604f 100644 --- a/fsutils/download_list.py +++ b/fsutils/download_list.py @@ -148,13 +148,13 @@ def get_hosted_folder_for_build_type(build_type, config): config.build_type_hosted_folder.get("Unknown") ) -def get_supported_build_type(build_type, config): +def is_supported_build_type(build_type, config): if build_type in config.build_type_hosted_folder: - return build_type + return True else: - return None + return False def get_hosted_folder_for_os_type(os_type, config): - return config.build_type_hosted_folder.get( + return config.os_hosted_folder.get( os_type ) @@ -177,13 +177,17 @@ def unpack_artifacts(path_to_artifacts_directory, config): build_types_found = {} zips = glob.glob(f"{path_to_artifacts_directory}/*.zip") for file in zips: + print(f"Processing zip file {file}") filename, build_type, platform = extract_vars_from_zipfile_name(file) - - build_type = get_supported_build_type( build_type, config) - if build_type == None: - print(f"Invalid build_type {build_type} from file {file} using 'Unknown'") + print(f"Identified filename {filename}, build_type {build_type} and platform {platform} from file {file}") + if is_supported_build_type( build_type, config) == False: + print(f"Invalid build_type {build_type} from file {file} using 'Unknown' instead") build_type = "Unknown" + else: + print(f"Using build_type {build_type} from file {file}") + build_folder = get_hosted_folder_for_build_type(build_type, config) + print(f"build_folder {build_folder}") build_type_dir = os.path.join(path_to_artifacts_directory, build_folder) try: