Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
status = response["Status"]
if status == "FAILED":
status_reason = response["StatusReason"]
if "didn't contain changes" in response["StatusReason"]:
logger.debug(
"Stack %s did not change, not updating.",
fqn,
)
raise exceptions.StackDidNotChange
raise exceptions.UnhandledChangeSetStatus(
fqn, change_set_id, status, status_reason
)
execution_status = response["ExecutionStatus"]
if execution_status != "AVAILABLE":
raise exceptions.UnableToExecuteChangeSet(fqn,
change_set_id,
execution_status)
changes = response["Changes"]
return changes, change_set_id
)
cfn_client.delete_change_set(ChangeSetName=change_set_id)
raise exceptions.StackDidNotChange()
logger.warn(
"Got strange status, '%s' for changeset '%s'. Not deleting for "
"further investigation - you will need to delete the changeset "
"manually.",
status, change_set_id
)
raise exceptions.UnhandledChangeSetStatus(
fqn, change_set_id, status, status_reason
)
execution_status = response["ExecutionStatus"]
if execution_status != "AVAILABLE":
raise exceptions.UnableToExecuteChangeSet(fqn,
change_set_id,
execution_status)
changes = response["Changes"]
return changes, change_set_id
)
cfn_client.delete_change_set(ChangeSetName=change_set_id)
raise exceptions.StackDidNotChange()
logger.warn(
"Got strange status, '%s' for changeset '%s'. Not deleting for "
"further investigation - you will need to delete the changeset "
"manually.",
status, change_set_id
)
raise exceptions.UnhandledChangeSetStatus(
fqn, change_set_id, status, status_reason
)
execution_status = response["ExecutionStatus"]
if execution_status != "AVAILABLE":
raise exceptions.UnableToExecuteChangeSet(fqn,
change_set_id,
execution_status)
changes = response["Changes"]
return changes, change_set_id
def __init__(self, stack_name, change_set_id, execution_status):
self.stack_name = stack_name
self.id = change_set_id
self.execution_status = execution_status
message = ("Changeset '%s' on stack '%s' had bad execution status: "
"%s" % (change_set_id, stack_name, execution_status))
super(UnableToExecuteChangeSet, self).__init__(message)