[elbe-devel] [PATCH 1/4] efilesystem: switch from subprocess.call() to shellhelper.system()
Torben Hohn
torben.hohn at linutronix.de
Wed Jan 15 16:10:40 CET 2020
subprocess.call() does not throw an exception upon error.
Use shellhelper.system() which throws CommandError upon error.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/efilesystem.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
index 3b2bf3a59..2230cfcb4 100644
--- a/elbepack/efilesystem.py
+++ b/elbepack/efilesystem.py
@@ -36,8 +36,8 @@ def copy_filelist(src, filelist, dst):
st = src.stat(f)
dst.chown(f, st.st_uid, st.st_gid)
else:
- subprocess.call(["cp", "-a", "--reflink=auto",
- src.fname(f), dst.fname(f)])
+ system('cp -a --reflink=auto "%s" "%s"' % (src.fname(f),
+ dst.fname(f)))
# update utime which will change after a file has been copied into
# the directory
for f in filelist:
--
2.20.1
More information about the elbe-devel
mailing list