rossjones 6d64b12b41 Remove ResourceWarnings when loading AMIS and INSTANCE_TYPES
When loading AMIS and INSTANCE_TYPES in moto.ec2.models a file handle is
potentially leaked when loading the JSON.  This results in a
ResourceWarning which is a bit of unnecessary noise.

Rather than pass a call to open() to json.load() this instead uses a
context-manager in a small private helper function.

This fixes https://github.com/spulec/moto/issues/2620
2020-02-04 10:04:01 +00:00
..
2020-01-14 09:55:32 -08:00
2019-12-19 17:47:17 -08:00
2019-10-31 10:36:05 -07:00