Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _send(self, status=None, reason="", send_response=_send_response):
if len(str(str(self.Reason))) > 256:
self.Reason = "ERROR: (truncated) " + str(self.Reason)[len(str(self.Reason)) - 240:]
if len(str(reason)) > 256:
reason = "ERROR: (truncated) " + str(reason)[len(str(reason)) - 240:]
response_body = {
'Status': self.Status,
'PhysicalResourceId': str(self.PhysicalResourceId),
'StackId': self.StackId,
'RequestId': self.RequestId,
'LogicalResourceId': self.LogicalResourceId,
'Reason': str(self.Reason),
'Data': self.Data,
}
if status:
response_body.update({'Status': status, 'Reason': reason})
send_response(self._response_url, response_body)
def _send(self, status=None, reason="", send_response=_send_response):
if len(str(str(self.Reason))) > 256:
self.Reason = "ERROR: (truncated) " + str(self.Reason)[len(str(self.Reason)) - 240:]
if len(str(reason)) > 256:
reason = "ERROR: (truncated) " + str(reason)[len(str(reason)) - 240:]
response_body = {
'Status': self.Status,
'PhysicalResourceId': str(self.PhysicalResourceId),
'StackId': self.StackId,
'RequestId': self.RequestId,
'LogicalResourceId': self.LogicalResourceId,
'Reason': str(self.Reason),
'Data': self.Data,
}
if status:
response_body.update({'Status': status, 'Reason': reason})
send_response(self._response_url, response_body)
def _send(self, status=None, reason="", send_response=_send_response):
if len(str(str(self.Reason))) > 256:
self.Reason = "ERROR: (truncated) " + str(self.Reason)[len(str(self.Reason)) - 240:]
if len(str(reason)) > 256:
reason = "ERROR: (truncated) " + str(reason)[len(str(reason)) - 240:]
response_body = {
'Status': self.Status,
'PhysicalResourceId': str(self.PhysicalResourceId),
'StackId': self.StackId,
'RequestId': self.RequestId,
'LogicalResourceId': self.LogicalResourceId,
'Reason': str(self.Reason),
'Data': self.Data,
}
if status:
response_body.update({'Status': status, 'Reason': reason})
send_response(self._response_url, response_body)