From b180f66ef022631ba46849158940829dc0896db6 Mon Sep 17 00:00:00 2001 From: Carlos Meza Date: Sun, 25 Feb 2018 09:34:12 +0000 Subject: [PATCH] pylint E1101(no-member) --- bootstrapvz/common/fs/qemuvolume.py | 7 ++++++- bootstrapvz/plugins/apt_proxy/tasks.py | 3 ++- bootstrapvz/plugins/prebootstrapped/__init__.py | 3 ++- bootstrapvz/remote/server.py | 1 + pylintrc | 5 ++--- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bootstrapvz/common/fs/qemuvolume.py b/bootstrapvz/common/fs/qemuvolume.py index 6783ec1..e5d7eb7 100644 --- a/bootstrapvz/common/fs/qemuvolume.py +++ b/bootstrapvz/common/fs/qemuvolume.py @@ -9,7 +9,12 @@ class QEMUVolume(LoopbackVolume): def _before_create(self, e): self.image_path = e.image_path vol_size = str(self.size.bytes.get_qty_in('MiB')) + 'M' - log_check_call(['qemu-img', 'create', '-f', self.qemu_format, self.image_path, vol_size]) + log_check_call([ + 'qemu-img', + 'create', '-f', + self.qemu_format, # pylint: disable=no-member + self.image_path, + vol_size]) def _check_nbd_module(self): from bootstrapvz.base.fs.partitionmaps.none import NoPartitions diff --git a/bootstrapvz/plugins/apt_proxy/tasks.py b/bootstrapvz/plugins/apt_proxy/tasks.py index 9ce5304..e09f410 100644 --- a/bootstrapvz/plugins/apt_proxy/tasks.py +++ b/bootstrapvz/plugins/apt_proxy/tasks.py @@ -16,8 +16,9 @@ class CheckAptProxy(Task): proxy_url = 'http://{address}:{port}'.format(address=proxy_address, port=proxy_port) try: urllib2.urlopen(proxy_url, timeout=5) - except Exception as e: + except urllib2.URLError as e: # Default response from `apt-cacher-ng` + # pylint: disable=no-member if isinstance(e, urllib2.HTTPError) and e.code in [404, 406] and e.msg == 'Usage Information': pass else: diff --git a/bootstrapvz/plugins/prebootstrapped/__init__.py b/bootstrapvz/plugins/prebootstrapped/__init__.py index 364509b..8250b2f 100644 --- a/bootstrapvz/plugins/prebootstrapped/__init__.py +++ b/bootstrapvz/plugins/prebootstrapped/__init__.py @@ -10,6 +10,7 @@ from bootstrapvz.common.tasks import apt from bootstrapvz.common.tasks import bootstrap from bootstrapvz.common.tasks import filesystem from bootstrapvz.common.tasks import partitioning +import bootstrapvz.common.tasks.dpkg def validate_manifest(data, validator, error): @@ -31,7 +32,7 @@ def resolve_tasks(taskset, manifest): apt.DisableDaemonAutostart, dpkg.InitializeBootstrapFilterList, - dpkg.CreateDpkgCfg, + bootstrapvz.common.tasks.dpkg.CreateDpkgCfg, dpkg.CreateBootstrapFilterScripts, dpkg.FilterLocales, dpkg.ExcludeDocs, diff --git a/bootstrapvz/remote/server.py b/bootstrapvz/remote/server.py index 72e874e..f0db204 100644 --- a/bootstrapvz/remote/server.py +++ b/bootstrapvz/remote/server.py @@ -69,6 +69,7 @@ class Server(object): @Pyro4.expose def ping(self): if hasattr(self, 'connection_timeout'): + # pylint: disable=no-member self.connection_timeout.cancel() del self.connection_timeout return 'pong' diff --git a/pylintrc b/pylintrc index add83b5..403f987 100644 --- a/pylintrc +++ b/pylintrc @@ -32,7 +32,7 @@ enable=W0401,W0403,W0404,W0406,W0611,W0614 # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifier separated by comma (,) or put this option # multiple time. -disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1101,E1121,E1601,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0621,W0640,W0703,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710 +disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0621,W0640,W0703,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710 # W0511 fixme # C0111 mssing-docstring # I0011 locally-disabled @@ -41,7 +41,6 @@ disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1101,E1121,E1601,E1608,W0102, #TODO # E0632(unbalanced-tuple-unpacking) -# E1101(no-member) # E1121(too-many-function-args) # E1601(print-statement) # E1608(old-octal-literal) @@ -204,7 +203,7 @@ ignore-mixin-members=yes # List of classes names for which member attributes should not be checked # (useful for classes with attributes dynamically set). -ignored-classes=SQLObject +ignored-classes=Fysom,AbstractPartitionMap,OracleStorageAPIClient # When zope mode is activated, add a predefined set of Zope acquired attributes # to generated-members.