summaryrefslogtreecommitdiff
path: root/ec2-get-info.py
diff options
context:
space:
mode:
authorSoren Hansen <soren@canonical.com>2009-08-11 09:31:46 +0200
committerSoren Hansen <soren@canonical.com>2009-08-11 09:31:46 +0200
commit56326b28b8c3da7a8320e3d01c2a02b2e80c2fc2 (patch)
treec48a227eb4ffeabb869d66112bab77301cb62db7 /ec2-get-info.py
parent3c598ec632871e5112c326d8942ab0d26d54b546 (diff)
downloadvyos-cloud-init-56326b28b8c3da7a8320e3d01c2a02b2e80c2fc2.tar.gz
vyos-cloud-init-56326b28b8c3da7a8320e3d01c2a02b2e80c2fc2.zip
Fix ec2-get-info to work with simple testing environment (i.e. don't append a slash to every single URL)
Diffstat (limited to 'ec2-get-info.py')
-rwxr-xr-xec2-get-info.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ec2-get-info.py b/ec2-get-info.py
index 01ffe722..6af780ef 100755
--- a/ec2-get-info.py
+++ b/ec2-get-info.py
@@ -45,7 +45,7 @@ def getData(ec2data):
api_ver = '2008-02-01'
metadata = None
base_url = 'http://169.254.169.254/%s/meta-data' % api_ver
- data = urllib.urlopen('%s/%s/' %(base_url,ec2data)).read()
+ data = urllib.urlopen('%s/%s' %(base_url,ec2data)).read()
print "%s: %s" %(ec2data,data)
def showAllData(ec2Data):
@@ -53,7 +53,7 @@ def showAllData(ec2Data):
metadata = None
base_url = 'http://169.254.169.254/%s/meta-data' % api_ver
for x in ec2Data:
- data = urllib.urlopen('%s/%s/' %(base_url,x)).read()
+ data = urllib.urlopen('%s/%s' %(base_url,x)).read()
print "%s: %s" %(ec2data,data)
def main():