Merge pull request #3103 from shano/fix-invalid-yaml-parsererror
Cloudformation: Fix - validate template yml fixes
This commit is contained in:
commit
c1cffec674
2 changed files with 21 additions and 2 deletions
|
|
@ -365,8 +365,8 @@ class CloudFormationResponse(BaseResponse):
|
|||
except (ValueError, KeyError):
|
||||
pass
|
||||
try:
|
||||
description = yaml.load(template_body)["Description"]
|
||||
except (yaml.ParserError, KeyError):
|
||||
description = yaml.load(template_body, Loader=yaml.Loader)["Description"]
|
||||
except (yaml.parser.ParserError, yaml.scanner.ScannerError, KeyError):
|
||||
pass
|
||||
template = self.response_template(VALIDATE_STACK_RESPONSE_TEMPLATE)
|
||||
return template.render(description=description)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue