cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #05514
[Merge] ~chad.smith/cloud-init:cleanup/pylint-write-network into cloud-init:master
Chad Smith has proposed merging ~chad.smith/cloud-init:cleanup/pylint-write-network into cloud-init:master.
Commit message:
pylint: ignore warning assignment-from-no-return for _write_network
Distro subclasses arch, freebsd and debian still have a path with an
implemented _write_network method which has a return value. Can drop
this pylint ignore when _write_network is dropped from arch, freebsd
and debian.
Requested reviews:
cloud-init commiters (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/355477
to test:
tox -e tip-pylint # before and after this branch
--
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:cleanup/pylint-write-network into cloud-init:master.
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index ac150be..8924723 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -143,7 +143,11 @@ class Distro(object):
# this applies network where 'settings' is interfaces(5) style
# it is obsolete compared to apply_network_config
# Write it out
+
+ # pylint: disable=assignment-from-no-return
+ # We have implementations in arch, freebsd and gento still
dev_names = self._write_network(settings)
+ # pylint: enable=assignment-from-no-return
# Now try to bring them up
if bring_up:
return self._bring_up_interfaces(dev_names)
References