Scott Moser has proposed merging ~smoser/cloud-init:fix/pylint-bionic-python into cloud-init:master.
Commit message: tests: Fix some warnings in tests that popped up with newer python. When running 'tox -e pylint' on a bionic system (python 3.6.4) I started seeing errors today like: tests/cloud_tests/platforms/__init__.py:5: [E0401(import-error), ] Unable to import 'tests.cloud_tests.platforms.ec2' The fix for those first errors was simply to create the __init__.py. The second set of changes fixes fallout found from actually now having pylint properly run on more of the cloud_tests. Requested reviews: cloud-init commiters (cloud-init-dev) For more details, see: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/341465 see commit message -- Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/pylint-bionic-python into cloud-init:master.
diff --git a/.pylintrc b/.pylintrc index 05a086d..0bdfa59 100644 --- a/.pylintrc +++ b/.pylintrc @@ -46,7 +46,17 @@ reports=no # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. -ignored-modules=six.moves,pkg_resources,httplib,http.client,paramiko,simplestreams +ignored-modules= + http.client, + httplib, + pkg_resources, + six.moves, + # cloud_tests requirements. + boto3, + botocore, + paramiko, + pylxd, + simplestreams # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of diff --git a/tests/cloud_tests/platforms/ec2/__init__.py b/tests/cloud_tests/platforms/ec2/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/cloud_tests/platforms/ec2/__init__.py diff --git a/tests/cloud_tests/platforms/lxd/__init__.py b/tests/cloud_tests/platforms/lxd/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/cloud_tests/platforms/lxd/__init__.py diff --git a/tests/cloud_tests/platforms/lxd/platform.py b/tests/cloud_tests/platforms/lxd/platform.py index 6a01692..f7251a0 100644 --- a/tests/cloud_tests/platforms/lxd/platform.py +++ b/tests/cloud_tests/platforms/lxd/platform.py @@ -101,8 +101,4 @@ class LXDPlatform(Platform): """ return self.client.images.get_by_alias(alias) - def destroy(self): - """Clean up platform data.""" - super(LXDPlatform, self).destroy() - # vi: ts=4 expandtab diff --git a/tests/cloud_tests/platforms/nocloudkvm/__init__.py b/tests/cloud_tests/platforms/nocloudkvm/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/cloud_tests/platforms/nocloudkvm/__init__.py diff --git a/tests/cloud_tests/platforms/nocloudkvm/instance.py b/tests/cloud_tests/platforms/nocloudkvm/instance.py index 932dc0f..33ff3f2 100644 --- a/tests/cloud_tests/platforms/nocloudkvm/instance.py +++ b/tests/cloud_tests/platforms/nocloudkvm/instance.py @@ -109,7 +109,7 @@ class NoCloudKVMInstance(Instance): if self.pid: try: c_util.subp(['kill', '-9', self.pid]) - except util.ProcessExectuionError: + except c_util.ProcessExecutionError: pass if self.pid_file: diff --git a/tests/cloud_tests/platforms/nocloudkvm/platform.py b/tests/cloud_tests/platforms/nocloudkvm/platform.py index a7e6f5d..8593346 100644 --- a/tests/cloud_tests/platforms/nocloudkvm/platform.py +++ b/tests/cloud_tests/platforms/nocloudkvm/platform.py @@ -21,10 +21,6 @@ class NoCloudKVMPlatform(Platform): platform_name = 'nocloud-kvm' - def __init__(self, config): - """Set up platform.""" - super(NoCloudKVMPlatform, self).__init__(config) - def get_image(self, img_conf): """Get image using specified image configuration.
_______________________________________________ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp