[elbe-devel] [PATCH 02/13] Change os.sytem to call_check for "chroot.py"
dion at linutronix.de
dion at linutronix.de
Mon Jun 24 12:48:42 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
elbepack/commands/chroot.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/elbepack/commands/chroot.py b/elbepack/commands/chroot.py
index 7529fcf7..25e8e58a 100644
--- a/elbepack/commands/chroot.py
+++ b/elbepack/commands/chroot.py
@@ -8,6 +8,7 @@
from __future__ import print_function
+from subprocess import check_call
from optparse import OptionParser
import sys
import os
@@ -62,7 +63,9 @@ def run_command(argv):
if opt.target:
with project.targetfs:
- os.system("/usr/sbin/chroot %s %s" % (project.targetpath, cmd))
+ check_call("/usr/sbin/chroot %s %s" % (project.targetpath, cmd),
+ shell=True)
else:
with project.buildenv:
- os.system("/usr/sbin/chroot %s %s" % (project.chrootpath, cmd))
+ check_call("/usr/sbin/chroot %s %s" % (project.chrootpath, cmd),
+ shell=True)
--
2.11.0
More information about the elbe-devel
mailing list