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

Torben Hohn torben.hohn at linutronix.de
Tue Jun 25 13:43:38 CEST 2019


On Mon, Jun 24, 2019 at 05:38:59PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>

please catch the Exception and log an error here.

> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
>  elbepack/commands/chroot.py | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/commands/chroot.py b/elbepack/commands/chroot.py
> index 7529fcf7..32d13f70 100644
> --- a/elbepack/commands/chroot.py
> +++ b/elbepack/commands/chroot.py
> @@ -14,6 +14,7 @@ import os
>  
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError, ValidationMode
> +from elbepack.shellhelper import system
>  
>  
>  def run_command(argv):
> @@ -62,7 +63,7 @@ def run_command(argv):
>  
>      if opt.target:
>          with project.targetfs:
> -            os.system("/usr/sbin/chroot %s %s" % (project.targetpath, cmd))
> +            system("/usr/sbin/chroot %s %s" % (project.targetpath, cmd))
>      else:
>          with project.buildenv:
> -            os.system("/usr/sbin/chroot %s %s" % (project.chrootpath, cmd))
> +            system("/usr/sbin/chroot %s %s" % (project.chrootpath, cmd))
> -- 
> 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