[Pkg-libvirt-commits] [libvirt-sandbox] 17/42: image: check for errors running mkfs / virt-sandbox

Guido Guenther agx at moszumanska.debian.org
Sat May 27 16:27:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to branch debian/experimental
in repository libvirt-sandbox.

commit 114d21454d4a58e11375a96f4f2a026b320d3b8a
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Fri Jul 15 12:51:38 2016 +0100

    image: check for errors running mkfs / virt-sandbox
    
    When running the sandbox commands, use check_call() instead
    of call() so that we detect errors running external commands.
    
    Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 libvirt-sandbox/image/sources/base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libvirt-sandbox/image/sources/base.py b/libvirt-sandbox/image/sources/base.py
index 8f6ccba..f70551d 100644
--- a/libvirt-sandbox/image/sources/base.py
+++ b/libvirt-sandbox/image/sources/base.py
@@ -128,7 +128,7 @@ class Source():
                   '/sbin/mkfs.ext3',
                   '/dev/disk/by-tag/disk_image']
         cmd = cmd + params
-        subprocess.call(cmd)
+        subprocess.check_call(cmd)
 
     def extract_tarball(self, diskfile, format, tarfile, connect):
         cmd = ['virt-sandbox']
@@ -148,4 +148,4 @@ class Source():
                   '-C',
                   '/mnt']
         cmd = cmd + params
-        subprocess.call(cmd)
+        subprocess.check_call(cmd)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt-sandbox.git



More information about the Pkg-libvirt-commits mailing list