[elbe-devel] [PATCH v2 03/15] Change os.sytem to shellhelper::system for "init.py"

Torben Hohn torben.hohn at linutronix.de
Tue Jun 25 13:45:14 CEST 2019


On Mon, Jun 24, 2019 at 05:39:00PM +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/commands/init.py | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
> index 08f77d1e..f02db06d 100644
> --- a/elbepack/commands/init.py
> +++ b/elbepack/commands/init.py
> @@ -21,7 +21,7 @@ from elbepack.version import elbe_version
>  from elbepack.templates import write_template, get_initvm_preseed
>  from elbepack.directories import init_template_dir, elbe_dir
>  from elbepack.config import cfg
> -from elbepack.shellhelper import command_out
> +from elbepack.shellhelper import command_out, system
>  
>  
>  def run_command(argv):
> @@ -224,9 +224,7 @@ def run_command(argv):
>                      os.path.join(out_path, "source.xml"))
>  
>      if opt.cdrom:
> -        os.system(
> -            '7z x -o%s "%s" elbe-keyring.gpg' %
> -            (out_path, opt.cdrom))
> +        system('7z x -o%s "%s" elbe-keyring.gpg' % (out_path, opt.cdrom))
>  
>      if opt.devel:
>          out_real = os.path.realpath(out_path)
> @@ -235,8 +233,6 @@ def run_command(argv):
>              ignore = '--exclude "%s"' % os.path.relpath(out_path,
>                                                          start=elbe_dir)
>  
> -        os.system(
> -            'tar cfj "%s" %s -C "%s" .' % (
> -                os.path.join(out_path, "elbe-devel.tar.bz2"),
> -                ignore,
> -                elbe_dir))
> +        system('tar cfj "%s" %s -C "%s" .' % (os.path.join(out_path, "elbe-devel.tar.bz2"),
> +                                              ignore,
> +                                              elbe_dir))
> -- 
> 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