moto/moto
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
..
acm ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
apigateway Update InvalidResourcePathException message 2020-01-28 20:56:13 -03:00
athena Add missing regions to all services 2019-12-26 17:12:22 +01:00
autoscaling Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
awslambda Merge pull request #2701 from kislyuk/patch-2 2020-01-30 07:52:23 +00:00
batch Add missing regions to all services 2019-12-26 17:12:22 +01:00
cloudformation requested changes from review 2020-02-01 14:52:48 -06:00
cloudwatch Fixed linter errors 2019-12-26 21:03:49 +01:00
codecommit [codecommit] fix repository name check 2019-12-26 16:30:06 +01:00
codepipeline Merge pull request #2657 from gruebel/add-missing-regions 2020-01-02 17:27:25 -08:00
cognitoidentity Fixed linter errors 2019-12-26 21:03:49 +01:00
cognitoidp moto/issues/2670 | Used black to format the code 2020-01-15 23:33:26 +08:00
config Add missing regions to all services 2019-12-26 17:12:22 +01:00
core black linting 2019-12-16 21:25:20 -05:00
datapipeline Fixed linter errors 2019-12-26 21:03:49 +01:00
datasync Add missing regions to all services 2019-12-26 17:12:22 +01:00
dynamodb ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
dynamodb2 Merge pull request #2675 from bblommers/bugfix/#2674 2020-01-22 20:01:53 -06:00
dynamodbstreams Add missing regions to all services 2019-12-26 17:12:22 +01:00
ec2 Remove ResourceWarnings when loading AMIS and INSTANCE_TYPES 2020-02-04 10:04:01 +00:00
ec2_instance_connect escape the dots 2019-12-19 17:47:17 -08:00
ecr Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
ecs Allow black to reformat correctly 2020-01-09 23:45:14 -06:00
elb Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
elbv2 Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
emr Fixed linter errors 2019-12-26 21:03:49 +01:00
events Add missing regions to all services 2019-12-26 17:12:22 +01:00
glacier Fixed linter errors 2019-12-26 21:03:49 +01:00
glue Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
iam Made UserName parameter optional for IAM access key functions 2020-01-27 12:12:21 -05:00
instance_metadata Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
iot Add missing regions to all services 2019-12-26 17:12:22 +01:00
iotdata Add missing regions to all services 2019-12-26 17:12:22 +01:00
kinesis Fixed linter errors 2019-12-26 21:03:49 +01:00
kms Fixed linter errors 2019-12-26 21:03:49 +01:00
logs Fix more typos. 2020-01-23 10:15:02 -08:00
opsworks ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
organizations ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
packages Fix some typos 2019-11-16 12:31:45 -08:00
polly Fixed linter errors 2019-12-26 21:03:49 +01:00
rds Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
rds2 Apply black in responses.py 2020-02-02 13:46:01 -03:00
redshift Fixed linter errors 2019-12-26 21:03:49 +01:00
resourcegroups Add missing regions to all services 2019-12-26 17:12:22 +01:00
resourcegroupstaggingapi Add missing regions to all services 2019-12-26 17:12:22 +01:00
route53 Add IsTruncated to Route53.list_resource_record_sets 2019-12-27 19:32:31 +01:00
s3 Change S3 S3_ALL_BUCKETS response to return bucket creation_date in iso format. 2020-01-22 20:43:45 -06:00
s3bucket_path Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
secretsmanager Fixed linter errors 2019-12-26 21:03:49 +01:00
ses black linting 2019-12-16 21:25:20 -05:00
sns Merge pull request #2657 from gruebel/add-missing-regions 2020-01-02 17:27:25 -08:00
sqs Fix sqs permission handling & add more error handling 2020-01-30 22:42:27 +01:00
ssm Merge pull request #2611 from Sytten/fix/ssm-parameter 2019-12-16 11:59:42 -08:00
stepfunctions Fixed linter errors 2019-12-26 21:03:49 +01:00
sts ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
swf Fixed linter errors 2019-12-26 21:03:49 +01:00
templates Add about page. 2017-03-12 19:58:40 -04:00
xray Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
__init__.py Merge pull request #2655 from levinine/add-codecommit 2019-12-27 09:04:19 -08:00
backends.py Merge pull request #2655 from levinine/add-codecommit 2019-12-27 09:04:19 -08:00
compat.py Fix linter errors. 2019-12-17 21:35:52 +05:30
server.py Fix some typos 2019-11-16 12:31:45 -08:00
settings.py Run black on moto & test directories. 2019-10-31 10:36:05 -07:00