From f725668d3ca3e35457c12f92243b5cce6601110b Mon Sep 17 00:00:00 2001 From: Dan Xie Date: Mon, 24 Feb 2025 13:39:45 +0800 Subject: [PATCH] fix the allow_empty_target OU path issue --- .../bootstrap_repository/adf-build/shared/python/target.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/target.py b/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/target.py index ef6c2270f..ce8ebb33e 100644 --- a/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/target.py +++ b/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/target.py @@ -263,11 +263,8 @@ def _target_is_ou_path(self, resolve_children=False): ou_id=None, excluded_paths=[], ) - except ClientError as client_err: - no_target_found = ( - client_err.response["Error"]["Code"] == "ParentNotFoundException" - ) - if no_target_found and self.adf_deployment_maps_allow_empty_target: + except Exception: + if self.adf_deployment_maps_allow_empty_target: LOGGER.info( "Note: Target OU was not found in AWS Org for path %s", self.path,