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
..
2019-12-26 17:12:22 +01:00
2019-12-26 21:03:49 +01:00
2019-12-26 21:03:49 +01:00
2019-12-16 21:25:20 -05:00
2019-12-26 21:03:49 +01:00
2019-12-19 17:47:17 -08:00
2019-10-31 10:36:05 -07:00
2020-01-09 23:45:14 -06:00
2019-10-31 10:36:05 -07:00
2019-12-26 21:03:49 +01:00
2019-12-26 21:03:49 +01:00
2019-12-26 17:12:22 +01:00
2019-12-26 21:03:49 +01:00
2019-12-26 21:03:49 +01:00
2020-01-23 10:15:02 -08:00
2019-11-16 12:31:45 -08:00
2019-12-26 21:03:49 +01:00
2019-10-31 10:36:05 -07:00
2020-02-02 13:46:01 -03:00
2019-12-26 21:03:49 +01:00
2019-12-26 21:03:49 +01:00
2019-12-16 21:25:20 -05:00
2019-12-26 21:03:49 +01:00
2019-12-26 21:03:49 +01:00
2017-03-12 19:58:40 -04:00
2019-12-17 21:35:52 +05:30
2019-11-16 12:31:45 -08:00