[libvirt] [PATCH sandbox 11/24] docker: check exit status of qemu-img command

Daniel P. Berrange berrange at redhat.com
Fri Jul 15 13:08:03 UTC 2016


Use check_call() instead of call() so that we abort if
something goes wrong with qemu-img

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 libvirt-sandbox/image/sources/docker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt-sandbox/image/sources/docker.py b/libvirt-sandbox/image/sources/docker.py
index 275a082..fc2faf2 100644
--- a/libvirt-sandbox/image/sources/docker.py
+++ b/libvirt-sandbox/image/sources/docker.py
@@ -276,7 +276,7 @@ class DockerSource(base.Source):
             cmd.append(templateImage)
             if parentImage is None:
                 cmd.append("10G")
-            subprocess.call(cmd)
+            subprocess.check_call(cmd)
 
             if parentImage is None:
                 self.format_disk(templateImage, "qcow2", connect)
-- 
2.7.4




More information about the libvir-list mailing list