summaryrefslogtreecommitdiff
path: root/cloudinit/DataSourceEc2.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-01-17 12:41:09 -0500
committerScott Moser <smoser@ubuntu.com>2012-01-17 12:41:09 -0500
commitec070cdf8746651d6dea011bd3ea9a445223028c (patch)
treeacc620e1f0423910a4d0ea0d79ee231290e4a393 /cloudinit/DataSourceEc2.py
parent1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc (diff)
downloadvyos-cloud-init-ec070cdf8746651d6dea011bd3ea9a445223028c.tar.gz
vyos-cloud-init-ec070cdf8746651d6dea011bd3ea9a445223028c.zip
[PATCH 4/4] Fix pylint conventions C0301 (line too long)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Diffstat (limited to 'cloudinit/DataSourceEc2.py')
-rw-r--r--cloudinit/DataSourceEc2.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/cloudinit/DataSourceEc2.py b/cloudinit/DataSourceEc2.py
index 35aa75d5..14484bdd 100644
--- a/cloudinit/DataSourceEc2.py
+++ b/cloudinit/DataSourceEc2.py
@@ -46,9 +46,12 @@ class DataSourceEc2(DataSource.DataSource):
if not self.wait_for_metadata_service():
return False
start = time.time()
- self.userdata_raw = boto_utils.get_instance_userdata(self.api_ver, None, self.metadata_address)
- self.metadata = boto_utils.get_instance_metadata(self.api_ver, self.metadata_address)
- log.debug("crawl of metadata service took %ds" % (time.time()-start))
+ self.userdata_raw = boto_utils.get_instance_userdata(self.api_ver,
+ None, self.metadata_address)
+ self.metadata = boto_utils.get_instance_metadata(self.api_ver,
+ self.metadata_address)
+ log.debug("crawl of metadata service took %ds" % (time.time() -
+ start))
return True
except Exception as e:
print e
@@ -201,7 +204,8 @@ class DataSourceEc2(DataSource.DataSource):
return False
-def wait_for_metadata_service(urls, max_wait=None, timeout=None, status_cb=None):
+def wait_for_metadata_service(urls, max_wait=None, timeout=None,
+ status_cb=None):
"""
urls: a list of urls to try
max_wait: roughly the maximum time to wait before giving up