Consolidate on the use of urllib2 (rather than both urllib and urllib2)

This commit is contained in:
Soren Hansen 2009-08-11 09:34:27 +02:00
parent 56326b28b8
commit c21874b192

View File

@ -66,7 +66,7 @@ class EC2Init():
conn = urllib2.urlopen('%s/public-keys/' % self.meta_data_base_url)
data = conn.read()
keyids = [line.split('=')[0] for line in data.split('\n')]
return [urllib.urlopen('%s/public-keys/%d/openssh-key' % (self.meta_data_base_url, int(keyid))).read().rstrip() for keyid in keyids]
return [urllib2.urlopen('%s/public-keys/%d/openssh-key' % (self.meta_data_base_url, int(keyid))).read().rstrip() for keyid in keyids]
def get_user_data(self):
return boto.utils.get_instance_userdata()