This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DATALAB-2091 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 2b843e32bc08b85a7bf3b90c078ca8b214f54423 Author: leonidfrolov <[email protected]> AuthorDate: Thu Apr 15 15:35:26 2021 +0300 [DATALAB-2091]: fixed one of emr creation errors --- infrastructure-provisioning/src/general/lib/aws/meta_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/general/lib/aws/meta_lib.py b/infrastructure-provisioning/src/general/lib/aws/meta_lib.py index 692043b..07de8b0 100644 --- a/infrastructure-provisioning/src/general/lib/aws/meta_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/meta_lib.py @@ -797,7 +797,7 @@ def get_ec2_price(instance_shape, region): # Price API require full name of region, for example: eu-west-1 -> 'EU (Ireland)' # endpoints will be loaded from: botocore/botocore/data/endpoints.json data = client._loader._cache.get(('load_data', 'endpoints')) - standard_partition = filter(lambda x: 'AWS Standard' == x['partitionName'], data['partitions'])[0] + standard_partition = next(filter(lambda x: 'AWS Standard' == x['partitionName'], data['partitions'])) region_description = standard_partition['regions'][region]['description'] response = client.get_products( --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
