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 2021/10/23 10:15:59 UTC
[libcloud] branch trunk updated: Add additional logging.
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
The following commit(s) were added to refs/heads/trunk by this push:
new 97f7005 Add additional logging.
97f7005 is described below
commit 97f70050c8ffd0a75af4df15a5b5deb466b21b71
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sat Oct 23 12:11:40 2021 +0200
Add additional logging.
---
contrib/scrape-ec2-prices.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/scrape-ec2-prices.py b/contrib/scrape-ec2-prices.py
index 06f935d..e552fff 100755
--- a/contrib/scrape-ec2-prices.py
+++ b/contrib/scrape-ec2-prices.py
@@ -208,8 +208,11 @@ def scrape_ec2_pricing():
res[os_map[OS]] = {}
for region in EC2_REGIONS:
res[os_map[OS]][region] = {}
- response = requests.get(url.format(region, OS))
+ full_url = url.format(region, OS)
+ response = requests.get(full_url)
if response.status_code != 200:
+ print("Skipping URL %s which returned non 200-status code (%s)" %
+ (full_url, response.status_code))
continue
data = response.json()