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

dion at linutronix.de dion at linutronix.de
Mon Jun 24 17:39:00 CEST 2019


From: Olivier Dion <dion at linutronix.de>

Signed-off-by: Olivier Dion <dion 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




More information about the elbe-devel mailing list