From 9801d226294cc2493c4a772fbb66d042c4852185 Mon Sep 17 00:00:00 2001 From: Jack Danger Canty Date: Thu, 11 May 2017 07:15:07 -0700 Subject: [PATCH] The name of yaml exceptions is more consistent between Py2->3 --- moto/cloudformation/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py index 824d568a2..f791406ab 100644 --- a/moto/cloudformation/models.py +++ b/moto/cloudformation/models.py @@ -73,9 +73,9 @@ class FakeStack(BaseModel): def _parse_template(self): try: - self.template_dict = json.loads(self.template) - except json.JSONDecodeError: self.template_dict = yaml.load(self.template) + except yaml.parser.ParserError: + self.template_dict = json.loads(self.template) @property def stack_parameters(self):