[elbe-devel] [PATCH v3 4/8] pylint pkgutils: cleanup
Manuel Traut
manut at linutronix.de
Fri Oct 19 11:48:48 CEST 2018
On Mon, Oct 15, 2018 at 03:18:02PM +0200, Torben Hohn wrote:
> pylint complains:
>
> ************* Module elbepack.pkgutils
> elbepack/pkgutils.py:22: [W0613(unused-argument), get_sources_list] Unused argument 'defs'
> elbepack/pkgutils.py:12: [W0611(unused-import), ] Unused mkdtemp imported from tempfile
> elbepack/pkgutils.py:19:1: E302 expected 2 blank lines, found 1
> elbepack/pkgutils.py:22:1: E302 expected 2 blank lines, found 1
> elbepack/pkgutils.py:74:1: E302 expected 2 blank lines, found 1
> elbepack/pkgutils.py:87:1: E302 expected 2 blank lines, found 1
> elbepack/pkgutils.py:131:25: E128 continuation line under-indented for visual indent
> elbepack/pkgutils.py:132:25: E128 continuation line under-indented for visual indent
>
> fix them
Reviewed-by: Manuel Traut <manut at linutronix.de>
> ---
> elbepack/pkgutils.py | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
> index 0c4e97fb..19009b4c 100644
> --- a/elbepack/pkgutils.py
> +++ b/elbepack/pkgutils.py
> @@ -9,17 +9,17 @@ from __future__ import print_function
>
> import os
>
> -from tempfile import mkdtemp
> -
> from apt_pkg import TagFile
> from elbepack.shellhelper import CommandError, system
> from elbepack.virtapt import get_virtaptcache
> from elbepack.hashes import validate_sha256, HashValidationFailed
>
> +
> class NoPackageException(Exception):
> pass
>
> -def get_sources_list(prj, defs):
> +
> +def get_sources_list(prj):
>
> suite = prj.text("suite")
>
> @@ -60,7 +60,7 @@ def get_uri(prj, defs, arch, target_pkg, incl_deps=False):
> arch = prj.text("buildimage/arch", default=defs, key="arch")
> suite = prj.text("suite")
>
> - apt_sources = get_sources_list(prj, defs)
> + apt_sources = get_sources_list(prj)
> apt_keys = get_key_list(prj)
>
> if arch == "default":
> @@ -71,6 +71,7 @@ def get_uri(prj, defs, arch, target_pkg, incl_deps=False):
> ret = v.get_uri(target_pkg, incl_deps)
> return ret
>
> +
> def get_dsc_size(fname):
> tf = TagFile(fname)
>
> @@ -84,6 +85,7 @@ def get_dsc_size(fname):
>
> return sz
>
> +
> def download_pkg(prj,
> target_dir,
> defs,
> @@ -127,9 +129,8 @@ def download_pkg(prj,
> try:
> validate_sha256(dest, sha256)
> except HashValidationFailed as e:
> - raise NoPackageException('%s failed to verify: %s' %
> - package,
> - e.message)
> + raise NoPackageException('%s failed to verify: %s' % package,
> + e.message)
> else:
> if log:
> log.printo("WARNING: Using untrusted %s package" % package)
> --
> 2.11.0
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
More information about the elbe-devel
mailing list