Consolidate on the use of urllib2 (rather than both urllib and urllib2)
This commit is contained in:
parent
56326b28b8
commit
c21874b192
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user