summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-06-15 22:50:12 -0400
committerScott Moser <smoser@ubuntu.com>2016-06-15 22:50:12 -0400
commitd4b587ebf500ddc2259fffc94a3c69c199c9a427 (patch)
tree987a743859aadb4bf2ad3daf0cc9e62afc92294c /cloudinit/config
parent8311e8f7a2d4ad782015c0eb4d22efd0c5a8af0f (diff)
downloadvyos-cloud-init-d4b587ebf500ddc2259fffc94a3c69c199c9a427.tar.gz
vyos-cloud-init-d4b587ebf500ddc2259fffc94a3c69c199c9a427.zip
fix some errors reported by pylint
pylint --errors-only found several errors. Some of the changes here represent real errors, others just code that pylint did not like.
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_apt_configure.py3
-rw-r--r--cloudinit/config/cc_growpart.py10
2 files changed, 7 insertions, 6 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py
index 96c4a43d..05ad4b03 100644
--- a/cloudinit/config/cc_apt_configure.py
+++ b/cloudinit/config/cc_apt_configure.py
@@ -208,8 +208,9 @@ def add_apt_sources(srclist, template_params=None, aa_repo_match=None):
template_params = {}
if aa_repo_match is None:
- def aa_repo_match(x):
+ def _aa_repo_match(x):
return False
+ aa_repo_match = _aa_repo_match
errorlist = []
srcdict = convert_to_new_format(srclist)
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py
index 859d69f1..40560f11 100644
--- a/cloudinit/config/cc_growpart.py
+++ b/cloudinit/config/cc_growpart.py
@@ -36,13 +36,13 @@ DEFAULT_CONFIG = {
}
-def enum(**enums):
- return type('Enum', (), enums)
+class RESIZE(object):
+ SKIPPED = "SKIPPED"
+ CHANGED = "CHANGED"
+ NOCHANGE = "NOCHANGE"
+ FAILED = "FAILED"
-RESIZE = enum(SKIPPED="SKIPPED", CHANGED="CHANGED", NOCHANGE="NOCHANGE",
- FAILED="FAILED")
-
LOG = logging.getLogger(__name__)