You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/12/27 22:02:32 UTC
[libcloud] 03/04: Make sure scraping script doens't fail if
productFamily attrubyte is not present.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 6edcf5cee0cb7a31bc6213e37a69dc5307f3fe43
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sun Dec 27 22:47:53 2020 +0100
Make sure scraping script doens't fail if productFamily attrubyte is not
present.
---
contrib/scrape-ec2-sizes.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/scrape-ec2-sizes.py b/contrib/scrape-ec2-sizes.py
index 0bc1d36..3470a2b 100755
--- a/contrib/scrape-ec2-sizes.py
+++ b/contrib/scrape-ec2-sizes.py
@@ -290,7 +290,7 @@ def parse():
raise e
for sku in products_data:
- if products_data[sku]['productFamily'] != "Compute Instance":
+ if products_data[sku].get('productFamily', "unknown") != "Compute Instance":
continue
location = products_data[sku]['attributes'].pop('location')
if location not in REGION_DETAILS: