[elbe-devel] [PATCH v3 49/52] Fix style for pkgutils.py
Torben Hohn
torben.hohn at linutronix.de
Fri Jul 5 13:30:50 CEST 2019
On Thu, Jun 27, 2019 at 02:45:03PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
>
> Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/pkgutils.py | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
> index 73c7de0a..e639a831 100644
> --- a/elbepack/pkgutils.py
> +++ b/elbepack/pkgutils.py
> @@ -132,7 +132,7 @@ def download_pkg(prj,
> raise NoPackageException('%s failed to verify: %s' % package,
> e.message)
> else:
> - logging.warning("Using unstrusted %s package" % package)
> + logging.warning("Using unstrusted '%s' package", package)
>
> return [y[0] for y in urilist]
>
> @@ -150,13 +150,13 @@ def extract_pkg(prj, target_dir, defs, package, arch, incl_deps=False):
> except CommandError:
> try:
> # dpkg did not work, try falling back to ar and tar
> - do('ar p "%s" data.tar.gz | tar xz -C "%s"' % (ppath,
> - target_dir))
> + do('ar p "%s" data.tar.gz | tar xz -C "%s"' %
> + (ppath, target_dir))
> except CommandError:
> try:
> - do('ar p "%s" data.tar.xz | tar xJ -C "%s"' % (
> - ppath, target_dir))
> - except CommandError as e:
> - loging.exception("Extract %s failed\n %s" (ppath, e))
> - raise e
> + do('ar p "%s" data.tar.xz | tar xJ -C "%s"' %
> + (ppath, target_dir))
> + except CommandError:
> + logging.exception("Extract %s failed", ppath)
> + raise
> do('rm -f "%s"' % ppath)
> --
> 2.11.0
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list