pylint W0621(redefined-outer-name)

This commit is contained in:
Carlos Meza 2018-02-25 09:57:59 +00:00
parent 23ec568d3c
commit 4e1a5922f7
7 changed files with 6 additions and 11 deletions

View file

@ -41,7 +41,6 @@ class InstallPackages(Task):
@classmethod
def install_remote(cls, info, remote_packages):
import os
from ..tools import log_check_call
from subprocess import CalledProcessError
try:
env = os.environ.copy()

View file

@ -134,6 +134,5 @@ class ShredHostkeys(Task):
private = [os.path.join(info.root, 'etc/ssh', name) for name in ssh_hostkeys]
public = [path + '.pub' for path in private]
from ..tools import log_check_call
log_check_call(['shred', '--remove'] + [key for key in private + public
if os.path.isfile(key)])

View file

@ -136,5 +136,4 @@ def copy_tree(from_path, to_path):
def rel_path(base, path):
import os.path
return os.path.normpath(os.path.join(os.path.dirname(base), path))

View file

@ -103,10 +103,10 @@ class CreateFromFolder(Task):
info.volume.fsm.current = 'attached'
def set_fs_states(volume):
volume.fsm.current = 'detached'
def set_fs_states(vol):
vol.fsm.current = 'detached'
p_map = volume.partition_map
p_map = vol.partition_map
from bootstrapvz.base.fs.partitionmaps.none import NoPartitions
if not isinstance(p_map, NoPartitions):
p_map.fsm.current = 'unmapped'

View file

@ -31,7 +31,6 @@ class CallbackServer(object):
def handle_log(self, pickled_record):
import pickle
record = pickle.loads(pickled_record)
log = logging.getLogger()
record.extra = getattr(record, 'extra', {})
record.extra['source'] = 'remote'
log.handle(record)

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,E1121,E1601,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0621,W0640,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,W0640,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710
# W0511 fixme
# C0111 mssing-docstring
# I0011 locally-disabled
@ -54,7 +54,6 @@ disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,
# W0402(deprecated-module)
# W0612(unused-variable)
# W0613(unused-argument)
# W0621(redefined-outer-name)
# W0640(cell-var-from-loop)
# W1201(logging-not-lazy)
# W1202(logging-format-interpolation)

View file

@ -39,8 +39,8 @@ def merge_dicts(*args):
copy = set([clone(value) for value in obj])
return copy
def merge(a, b, path=[]):
for key in b:
def merge(a, b, path=[]): # pylint: disable=redefined-outer-name
for key in b: # pylint: disable=redefined-outer-name
if key in a:
if isinstance(a[key], dict) and isinstance(b[key], dict):
merge(a[key], b[key], path + [str(key)])