diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-11-12 12:23:44 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-11-12 12:23:44 -0500 |
commit | 8730e143ec07372107d794abe9f4857ead6d4718 (patch) | |
tree | 06749e6cd37c140840cf79c68eeb8d14bab1e718 | |
parent | 2fabf3951d79ba67455a00895b5357fccf28f4f3 (diff) | |
download | vyos-cloud-init-8730e143ec07372107d794abe9f4857ead6d4718.tar.gz vyos-cloud-init-8730e143ec07372107d794abe9f4857ead6d4718.zip |
pep8 and pylint fixups
-rw-r--r-- | cloudinit/ec2_utils.py | 9 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceCloudStack.py | 2 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceEc2.py | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/cloudinit/ec2_utils.py b/cloudinit/ec2_utils.py index a278ef04..32bf3968 100644 --- a/cloudinit/ec2_utils.py +++ b/cloudinit/ec2_utils.py @@ -17,10 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import pkg_resources -from pkg_resources import parse_version - -import cloudinit.util as util -import cloudinit.url_helper as uh +from pkg_resources import parse_version as pver import boto.utils as boto_utils @@ -36,7 +33,7 @@ import boto.utils as boto_utils BOTO_LAZY = False try: _boto_lib = pkg_resources.get_distribution('boto') - if _boto_lib.parsed_version > parse_version("2.5.2"): + if _boto_lib.parsed_version > pver("2.5.2"): # pylint: disable=E1103 BOTO_LAZY = True except pkg_resources.DistributionNotFound: pass @@ -47,7 +44,7 @@ def _unlazy_dict(mp): return mp if not BOTO_LAZY: return mp - for (k, v) in mp.items(): + for (_k, v) in mp.items(): _unlazy_dict(v) return mp diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py index 78cf24d7..076dba5a 100644 --- a/cloudinit/sources/DataSourceCloudStack.py +++ b/cloudinit/sources/DataSourceCloudStack.py @@ -116,7 +116,7 @@ class DataSourceCloudStack(sources.DataSource): return False start_time = time.time() self.userdata_raw = ec2.get_instance_userdata(self.api_ver, - self.metadata_address) + self.metadata_address) self.metadata = ec2.get_instance_metadata(self.api_ver, self.metadata_address) LOG.debug("Crawl of metadata service took %s seconds", diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py index 6f51dfae..2db53446 100644 --- a/cloudinit/sources/DataSourceEc2.py +++ b/cloudinit/sources/DataSourceEc2.py @@ -65,7 +65,7 @@ class DataSourceEc2(sources.DataSource): return False start_time = time.time() self.userdata_raw = ec2.get_instance_userdata(self.api_ver, - self.metadata_address) + self.metadata_address) self.metadata = ec2.get_instance_metadata(self.api_ver, self.metadata_address) LOG.debug("Crawl of metadata service took %s seconds", |