Avoid crashing if key is not an str
@@ -74,6 +74,8 @@ class NodeConstructor(SafeConstructor):
for key_node, value_node in node.value:
key = self.construct_object(key_node, False)
value = self.construct_object(value_node, False)
+ if not isinstance(key, str):
+ continue
if key in mapping:
raise CfnParseError(
