[elbe-devel] [PATCH v3 10/15] Change os.sytem to shellhelper::system for "updatedpkg.py"
dion at linutronix.de
dion at linutronix.de
Wed Jun 26 10:40:14 CEST 2019
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/updatepkg.py | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/elbepack/updatepkg.py b/elbepack/updatepkg.py
index b41cffe0..4c848a55 100644
--- a/elbepack/updatepkg.py
+++ b/elbepack/updatepkg.py
@@ -14,6 +14,7 @@ from elbepack.elbexml import ElbeXML
from elbepack.dump import dump_fullpkgs
from elbepack.ziparchives import create_zip_archive
from elbepack.repomanager import UpdateRepo
+from elbepack.shellhelper import system
class MissingData(Exception):
@@ -109,7 +110,7 @@ def gen_update_pkg(project, xml_filename, upd_filename,
if os.path.exists(update):
rmtree(update)
- os.system('mkdir -p %s' % update)
+ system('mkdir -p %s' % update)
if xml_filename:
repodir = os.path.join(update, "repo")
@@ -128,14 +129,10 @@ def gen_update_pkg(project, xml_filename, upd_filename,
dump_fullpkgs(project.xml, project.buildenv.rfs, cache)
project.xml.xml.write(os.path.join(update, "new.xml"))
- os.system(
- "cp %s %s" %
- (xml_filename,
- os.path.join(
- update,
- "base.xml")))
+ system("cp %s %s" % (xml_filename,
+ os.path.join(update, "base.xml")))
else:
- os.system("cp source.xml update/new.xml")
+ system("cp source.xml update/new.xml")
if project.presh_file:
copyfile(project.presh_file, update + '/pre.sh')
--
2.11.0
More information about the elbe-devel
mailing list