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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]