fix to capture yaml scanner error (#3077)
This commit is contained in:
parent
610bf36f3b
commit
6305f707d2
2 changed files with 27 additions and 2 deletions
|
|
@ -315,8 +315,8 @@ class FakeStack(BaseModel):
|
|||
yaml.add_multi_constructor("", yaml_tag_constructor)
|
||||
try:
|
||||
self.template_dict = yaml.load(self.template, Loader=yaml.Loader)
|
||||
except yaml.parser.ParserError:
|
||||
self.template_dict = json.loads(self.template, Loader=yaml.Loader)
|
||||
except (yaml.parser.ParserError, yaml.scanner.ScannerError):
|
||||
self.template_dict = json.loads(self.template)
|
||||
|
||||
@property
|
||||
def stack_parameters(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue