Skip to content

Commit

Permalink
Use get to safely pull readOnlyProperties. (#3141)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin DeJong <[email protected]>
  • Loading branch information
parsnips and kddejong authored Apr 12, 2024
1 parent 5142c3c commit d881f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfnlint/template/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def build_output_string(resource_type, property_name):
for schema in cfnlint.helpers.REGISTRY_SCHEMAS:
if value["Type"] == schema["typeName"]:
results[name] = {}
for ro_property in schema["readOnlyProperties"]:
for ro_property in schema.get("readOnlyProperties", []):
try:
item = resolve_pointer(schema, ro_property)
except KeyError:
Expand Down

0 comments on commit d881f70

Please sign in to comment.