diff --git a/bootstrapvz/common/tasks/packages.py b/bootstrapvz/common/tasks/packages.py index fe84f9c..8051bc8 100644 --- a/bootstrapvz/common/tasks/packages.py +++ b/bootstrapvz/common/tasks/packages.py @@ -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() diff --git a/bootstrapvz/common/tasks/ssh.py b/bootstrapvz/common/tasks/ssh.py index 6cd5183..46addaf 100644 --- a/bootstrapvz/common/tasks/ssh.py +++ b/bootstrapvz/common/tasks/ssh.py @@ -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)]) diff --git a/bootstrapvz/common/tools.py b/bootstrapvz/common/tools.py index eb55712..c14f67a 100644 --- a/bootstrapvz/common/tools.py +++ b/bootstrapvz/common/tools.py @@ -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)) diff --git a/bootstrapvz/plugins/prebootstrapped/tasks.py b/bootstrapvz/plugins/prebootstrapped/tasks.py index d1f6294..85240ff 100644 --- a/bootstrapvz/plugins/prebootstrapped/tasks.py +++ b/bootstrapvz/plugins/prebootstrapped/tasks.py @@ -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' diff --git a/bootstrapvz/remote/build_servers/callback.py b/bootstrapvz/remote/build_servers/callback.py index 395cebc..35d5ab4 100644 --- a/bootstrapvz/remote/build_servers/callback.py +++ b/bootstrapvz/remote/build_servers/callback.py @@ -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) diff --git a/pylintrc b/pylintrc index 96a711d..11e90bc 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,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) diff --git a/tests/system/manifests/__init__.py b/tests/system/manifests/__init__.py index 26b205d..f922bff 100644 --- a/tests/system/manifests/__init__.py +++ b/tests/system/manifests/__init__.py @@ -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)])