From 182a7b98b7a748872a4c4d055ae5ade432e2f7e9 Mon Sep 17 00:00:00 2001 From: nggieber Date: Fri, 22 Oct 2021 17:33:30 -0700 Subject: [PATCH] Always convert gem_path to pathlib.Path and check it isFile() in case it is a str Signed-off-by: nggieber --- scripts/o3de/o3de/manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/o3de/o3de/manifest.py b/scripts/o3de/o3de/manifest.py index 6e449c19a3..297d8e39d2 100644 --- a/scripts/o3de/o3de/manifest.py +++ b/scripts/o3de/o3de/manifest.py @@ -502,7 +502,7 @@ def get_gem_json_data(gem_name: str = None, gem_path: str or pathlib.Path = None if gem_name and not gem_path: gem_path = get_registered(gem_name=gem_name, project_path=project_path) - if isinstance(gem_path, pathlib.Path) and gem_path.is_file(): + if pathlib.Path(gem_path).is_file(): return get_json_data_file(gem_path, 'gem', validation.valid_o3de_gem_json) else: return get_json_data('gem', gem_path, validation.valid_o3de_gem_json)