Skip to content

Commit

Permalink
Log warning when a pricing region isn't found in the region map (#1946)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored Mar 18, 2021
1 parent ed8bf79 commit 20dcb3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/update_specs_from_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ def get_results(service, product_families):
product = products.get('product', {})
if product:
if product.get('productFamily') in product_families and product.get('attributes').get('locationType') == "AWS Region":
if product.get('attributes').get('location') not in region_map:
LOGGER.warning('Region "%s" not found', product.get('attributes').get('location'))
continue
if not results.get(region_map[product.get('attributes').get('location')]):
results[region_map[product.get('attributes').get('location')]] = set()
results[region_map[product.get('attributes').get('location')]].add(
Expand Down

0 comments on commit 20dcb3c

Please sign in to comment.