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

Torben Hohn torben.hohn at linutronix.de
Tue Jun 25 14:09:35 CEST 2019


On Mon, Jun 24, 2019 at 05:39:10PM +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/virtapt.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
> index e382c688..8678baa2 100644
> --- a/elbepack/virtapt.py
> +++ b/elbepack/virtapt.py
> @@ -12,9 +12,10 @@ import os
>  import sys
>  
>  from tempfile import mkdtemp
> -
>  from multiprocessing.managers import BaseManager
>  
> +from elbepack.shellhelper import system
> +
>  # don't remove the apt import, it is really needed, due to some magic in
>  # apt_pkg
>  
> @@ -128,7 +129,7 @@ class VirtApt(object):
>              print(e)
>  
>      def __del__(self):
> -        os.system('rm -rf "%s"' % self.projectpath)
> +        system('rm -rf "%s"' % self.projectpath)
>  
>      def start(self):
>          pass
> @@ -153,7 +154,7 @@ class VirtApt(object):
>          else:
>              os.makedirs(newdir, mode)
>              # mode is not set correctly
> -            os.system("chmod 777 " + newdir)
> +            system("chmod 777 " + newdir)
>  
>      def touch(self, fname):
>          if os.path.exists(fname):
> -- 
> 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