pylint E1101(no-member)

This commit is contained in:
Carlos Meza 2018-02-25 09:34:12 +00:00
parent 7c3dac85aa
commit b180f66ef0
5 changed files with 13 additions and 6 deletions

View file

@ -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

View file

@ -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:

View file

@ -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,

View file

@ -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'

View file

@ -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.