Skip to content

Commit

Permalink
Fix decode when a template syntax issue is found (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored and Chuck Meyer committed Sep 6, 2018
1 parent 264a30b commit 544e1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfnlint/decode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def decode(filename, ignore_bad_template):
else:
matches = [create_match_yaml_parser_error(err, filename)]

if not isinstance(template, dict):
if not isinstance(template, dict) and not matches:
# Template isn't a dict which means nearly nothing will work
matches = [cfnlint.Match(1, 1, 1, 1, filename, cfnlint.ParseError(), message='Template needs to be an object.')]
return (template, matches)
Expand Down

0 comments on commit 544e1fa

Please sign in to comment.