You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/04/16 11:03:22 UTC

[incubator-datalab] 01/04: [DATALAB-2091]: fixed one of emr creation errors

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 <fr...@gmail.com>
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: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org