[elbe-devel] [PATCH 10/13] Change os.sytem to call_check for "initvmaction.py"
dion at linutronix.de
dion at linutronix.de
Mon Jun 24 12:48:50 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
elbepack/initvmaction.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 25af1d3f..346895e9 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -15,6 +15,8 @@ import time
import os
import datetime
+from subprocess import check_call
+
import libvirt
import elbepack
@@ -385,7 +387,8 @@ def extract_cdrom(cdrom):
"""
tmp = TmpdirFilesystem()
- os.system('7z x -o%s "%s" source.xml' % (tmp.path, cdrom))
+ check_call('7z x -o%s "%s" source.xml' % (tmp.path, cdrom),
+ shell=True)
print("", file=sys.stderr)
--
2.11.0
More information about the elbe-devel
mailing list