From 7ce376b5b2a6901a55718e3e9f953da6a1c2594b Mon Sep 17 00:00:00 2001 From: AMZN-Phil Date: Tue, 19 Oct 2021 08:40:36 -0700 Subject: [PATCH] Add some log output if the cached files cannot be found Signed-off-by: AMZN-Phil --- scripts/o3de/o3de/repo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/o3de/o3de/repo.py b/scripts/o3de/o3de/repo.py index ae8af43338..5c47c2bee8 100644 --- a/scripts/o3de/o3de/repo.py +++ b/scripts/o3de/o3de/repo.py @@ -92,7 +92,7 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, return 0 -def get_gem_json_paths_from_cached_repo(repo_uri : str) -> list: +def get_gem_json_paths_from_cached_repo(repo_uri: str) -> list: url = f'{repo_uri}/repo.json' repo_sha256 = hashlib.sha256(url.encode()) cache_folder = manifest.get_o3de_cache_folder() @@ -102,6 +102,7 @@ def get_gem_json_paths_from_cached_repo(repo_uri : str) -> list: file_name = pathlib.Path(cache_filename).resolve() if not file_name.is_file(): + logger.error(f'Could not find cached repo json file for {repo_uri}') return gem_list with file_name.open('r') as f: @@ -124,6 +125,7 @@ def get_gem_json_paths_from_cached_repo(repo_uri : str) -> list: manifest_json_sha256 = hashlib.sha256(manifest_json_uri.encode()) cache_gem_json_filepath = cache_folder / str(manifest_json_sha256.hexdigest() + '.json') if cache_gem_json_filepath.is_file(): + logger.warn(f'Could not find cached gem json file for {o3de_object_uri} in repo {repo_uri}') gem_list.append(cache_gem_json_filepath) return gem_list