diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-02-13 09:11:53 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-02-13 09:11:53 +0200 |
commit | 6fd6acf37cbad73ef929ef6a159073862ad2e048 (patch) | |
tree | 741e9a39df59f2941d92234f5dc99b391095c40e | |
parent | b1a6e4f44d90b80a48772e2dd89598793a16f48c (diff) | |
download | vmdb2-6fd6acf37cbad73ef929ef6a159073862ad2e048.tar.gz |
Change: add pylint3 back to check, fix issues it finds
This commit is dedicated to Gunnar.
-rwxr-xr-x | check | 2 | ||||
-rw-r--r-- | vmdb/app.py | 2 | ||||
-rw-r--r-- | vmdb/plugins/luks_plugin.py | 1 | ||||
-rw-r--r-- | vmdb/plugins/rootfs_cache_plugin.py | 2 | ||||
-rw-r--r-- | vmdb/plugins/virtuals_plugin.py | 2 | ||||
-rw-r--r-- | vmdb/state.py | 2 | ||||
-rw-r--r-- | vmdb/step_list.py | 4 | ||||
-rw-r--r-- | vmdb/tags.py | 3 |
8 files changed, 7 insertions, 11 deletions
@@ -3,7 +3,7 @@ set -eu python3 -m CoverageTestRunner --ignore-missing-from=without-tests yarns vmdb -#pylint3 --rcfile pylint.conf vmdb +pylint3 --rcfile pylint.conf vmdb yarn \ --shell=python2 \ --shell-arg '' \ diff --git a/vmdb/app.py b/vmdb/app.py index fb28145..5073a05 100644 --- a/vmdb/app.py +++ b/vmdb/app.py @@ -103,7 +103,7 @@ class Vmdb2(cliapp.Application): ] for method in methods: - logging.info('Calling {}'.format(method)) + logging.info('Calling %s', method) method(step, self.settings, state) except BaseException as e: vmdb.error(str(e)) diff --git a/vmdb/plugins/luks_plugin.py b/vmdb/plugins/luks_plugin.py index 7d8ed3f..9d48d99 100644 --- a/vmdb/plugins/luks_plugin.py +++ b/vmdb/plugins/luks_plugin.py @@ -80,7 +80,6 @@ class CryptsetupStepRunner(vmdb.StepRunnerInterface): if x is not None and os.path.exists(x): os.remove(x) - underlying = step['cryptsetup'] crypt_name = step['tag'] crypt_dev = '/dev/mapper/{}'.format(crypt_name) diff --git a/vmdb/plugins/rootfs_cache_plugin.py b/vmdb/plugins/rootfs_cache_plugin.py index 5c9a894..edfb3d4 100644 --- a/vmdb/plugins/rootfs_cache_plugin.py +++ b/vmdb/plugins/rootfs_cache_plugin.py @@ -56,7 +56,7 @@ class MakeCacheStepRunner(vmdb.StepRunnerInterface): 'tag {} mounted {} cached {}'.format( tag, tags.get_mount_point(tag), tags.is_cached(tag))) - vmdb.progress('caching rootdir'.format(rootdir)) + vmdb.progress('caching rootdir {}'.format(rootdir)) vmdb.progress('caching relative {}'.format(dirs)) if not os.path.exists(tar_path): vmdb.runcmd( diff --git a/vmdb/plugins/virtuals_plugin.py b/vmdb/plugins/virtuals_plugin.py index ec7682d..092c505 100644 --- a/vmdb/plugins/virtuals_plugin.py +++ b/vmdb/plugins/virtuals_plugin.py @@ -73,5 +73,5 @@ class VirtualFilesystemMountStepRunner(vmdb.StepRunnerInterface): vmdb.unmount(mount_point) except vmdb.NotMounted as e: logging.warning(str(e)) - except cliapp.AppException: + except cliapp.AppException: vmdb.warning('Something went wrong while unmounting. Ignoring.') diff --git a/vmdb/state.py b/vmdb/state.py index d64244d..88fde39 100644 --- a/vmdb/state.py +++ b/vmdb/state.py @@ -16,7 +16,7 @@ # =*= License: GPL-3+ =*= -class State(object): +class State: def __init__(self): self._attrs = {} # make sure this attribute exists diff --git a/vmdb/step_list.py b/vmdb/step_list.py index b8f55f4..f69b4bc 100644 --- a/vmdb/step_list.py +++ b/vmdb/step_list.py @@ -19,7 +19,7 @@ import cliapp -class StepRunnerInterface(object): # pragma: no cover +class StepRunnerInterface: # pragma: no cover def get_required_keys(self): raise NotImplementedError() @@ -53,7 +53,7 @@ class StepRunnerInterface(object): # pragma: no cover return getattr(state, value, False) -class StepRunnerList(object): +class StepRunnerList: def __init__(self): self._runners = [] diff --git a/vmdb/tags.py b/vmdb/tags.py index e2241b0..e9d73b3 100644 --- a/vmdb/tags.py +++ b/vmdb/tags.py @@ -22,9 +22,6 @@ # in /proc/mounts. -import vmdb - - class Tags: def __init__(self): |