Skip to content

Commit 7e98793

Browse files
authored
Added clearer error for failed IP import
1 parent 1ccd96b commit 7e98793

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dbclient/ClustersClient.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,11 @@ def import_instance_profiles(self, log_file='instance_profiles.log'):
469469
if ip_arn not in list_of_profiles:
470470
print("Importing arn: {0}".format(ip_arn))
471471
resp = self.post('/instance-profiles/add', {'instance_profile_arn': ip_arn})
472-
if not logging_utils.log_response_error(error_logger, resp):
472+
if not logging_utils.check_error(resp):
473473
import_profiles_count += 1
474+
else:
475+
logging.info(f"Failed instance profile import for {ip_arn}")
476+
logging_utils.log_response_error(error_logger, resp)
474477
else:
475478
logging.info("Skipping since profile already exists: {0}".format(ip_arn))
476479
return import_profiles_count

0 commit comments

Comments
 (0)