jorgebastida / gordon

λ Gordon is a tool to create, wire and deploy AWS Lambdas using CloudFormation
Other
2.04k stars 137 forks source link

convert_cloudformation_types breaks nested dictionaries #86

Closed DaveWK closed 7 years ago

DaveWK commented 8 years ago

Hi,

I noticed that after updating to the latest gordon, I no longer have .context files which include nested elements in my common.yml

in example, for my common.yml:

parent:
  child1: 60
  child2: 60
  child3: 60

used to give me an array like: parent[child1] parent[child2] parent[child3]

where all the values would be 60.

Now, I only get: parent[0] = child1 parent[1] = child2 parent[2] = child3

and my value of 60 is nowhere to be found.

After some digging I discovered that the offending change is the convert_cloudformation_types in utils.py which wraps the load_settings call on line 470 of core.py

I wasn't sure what syntax rules this was attempting to adjust for, so I just added a simple return data on line 187 of util.py to bypass it and get myself back to a working state.