cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #01919
[Merge] ~powersj/cloud-init:pylint-warnings-cleanup into cloud-init:master
Joshua Powers has proposed merging ~powersj/cloud-init:pylint-warnings-cleanup into cloud-init:master.
Requested reviews:
cloud init development team (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/322163
Cleanup of various pylint warnings
--
Your team cloud init development team is requested to review the proposed merge of ~powersj/cloud-init:pylint-warnings-cleanup into cloud-init:master.
diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py
index 7f36cf8..37deb4b 100644
--- a/cloudinit/config/cc_rh_subscription.py
+++ b/cloudinit/config/cc_rh_subscription.py
@@ -351,8 +351,9 @@ class SubscriptionManager(object):
.replace('--pool=', ''))
return True
except util.ProcessExecutionError as e:
- self.log_warn("Unable to attach pool {0} "
- "due to {1}".format(pool, e))
+ self.log_warn("Unable to attach the following pools to your "
+ "system: %s due to %s" % (", ".join(pool_list))
+ .replace('--pool=', ''), e)
return False
def update_repos(self, erepos, drepos):
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py
index 9819d4f..6a8c3bb 100644
--- a/cloudinit/net/eni.py
+++ b/cloudinit/net/eni.py
@@ -412,10 +412,9 @@ class Renderer(renderer.Renderer):
if searchdomains:
lo['subnets'][0]["dns_search"] = (" ".join(searchdomains))
- ''' Apply a sort order to ensure that we write out
- the physical interfaces first; this is critical for
- bonding
- '''
+ # Apply a sort order to ensure that we write out
+ # the physical interfaces first; this is critical for
+ # bonding
order = {
'loopback': 0,
'physical': 1,
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index 6f01a13..93a322d 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -284,7 +284,7 @@ def identify_aws(data):
if (data['uuid'].startswith('ec2') and
(data['uuid_source'] == 'hypervisor' or
data['uuid'] == data['serial'])):
- return Platforms.AWS
+ return Platforms.AWS
return None
diff --git a/cloudinit/sources/DataSourceMAAS.py b/cloudinit/sources/DataSourceMAAS.py
index 41179b0..9730052 100644
--- a/cloudinit/sources/DataSourceMAAS.py
+++ b/cloudinit/sources/DataSourceMAAS.py
@@ -286,10 +286,10 @@ if __name__ == "__main__":
default=MD_VERSION)
subcmds = parser.add_subparsers(title="subcommands", dest="subcmd")
- for (name, help) in (('crawl', 'crawl the datasource'),
- ('get', 'do a single GET of provided url'),
- ('check-seed', 'read and verify seed at url')):
- p = subcmds.add_parser(name, help=help)
+ for (name, helpstr) in (('crawl', 'crawl the datasource'),
+ ('get', 'do a single GET of provided url'),
+ ('check-seed', 'read and verify seed at url')):
+ p = subcmds.add_parser(name, help=helpstr)
p.add_argument("url", help="the datasource url", nargs='?',
default=None)
diff --git a/cloudinit/sources/helpers/vmware/imc/config_file.py b/cloudinit/sources/helpers/vmware/imc/config_file.py
index 14293f3..c3e5feb 100644
--- a/cloudinit/sources/helpers/vmware/imc/config_file.py
+++ b/cloudinit/sources/helpers/vmware/imc/config_file.py
@@ -22,7 +22,6 @@ class ConfigFile(ConfigSource, dict):
def __init__(self, filename):
self._loadConfigFile(filename)
- pass
def _insertKey(self, key, val):
"""
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 1216543..927f432 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -530,11 +530,11 @@ class Init(object):
with events.ReportEventStack("consume-user-data",
"reading and applying user-data",
parent=self.reporter):
- self._consume_userdata(frequency)
+ self._consume_userdata(frequency)
with events.ReportEventStack("consume-vendor-data",
"reading and applying vendor-data",
parent=self.reporter):
- self._consume_vendordata(frequency)
+ self._consume_vendordata(frequency)
# Perform post-consumption adjustments so that
# modules that run during the init stage reflect
@@ -878,7 +878,6 @@ def _pkl_load(fname):
except Exception as e:
if os.path.isfile(fname):
LOG.warn("failed loading pickle in %s: %s" % (fname, e))
- pass
# This is allowed so just return nothing successfully loaded...
if not pickle_contents:
diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py
index 2f6a158..2596278 100644
--- a/cloudinit/url_helper.py
+++ b/cloudinit/url_helper.py
@@ -468,7 +468,7 @@ class OauthUrlHelper(object):
if extra_exception_cb:
ret = extra_exception_cb(msg, exception)
finally:
- self.exception_cb(msg, exception)
+ self.exception_cb(msg, exception)
return ret
def _headers_cb(self, extra_headers_cb, url):
Follow ups