From 6903f23563549f8d81fa911103594f9f472ab3c7 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Mon, 26 Jun 2017 07:28:47 +0100 Subject: Improve logging of virt-sandbox --- src/virtBootstrap/sources.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/virtBootstrap/sources.py') diff --git a/src/virtBootstrap/sources.py b/src/virtBootstrap/sources.py index 6e54a96..2d910fc 100644 --- a/src/virtBootstrap/sources.py +++ b/src/virtBootstrap/sources.py @@ -27,7 +27,7 @@ import tempfile import getpass import os import logging -from subprocess import call, CalledProcessError, PIPE, Popen +from subprocess import CalledProcessError, PIPE, Popen # Default virtual size of qcow2 image DEF_QCOW2_SIZE = '5G' @@ -86,9 +86,7 @@ def safe_untar(src, dest): # Compression type is auto detected from tar # Exclude files under /dev to avoid "Cannot mknod: Operation not permitted" params = ['--', '/bin/tar', 'xf', src, '-C', '/mnt', '--exclude', 'dev/*'] - if call(virt_sandbox + params) != 0: - logging.error(_('virt-sandbox exit with non-zero code. ' - 'Please check if "libvirtd" is running.')) + execute(virt_sandbox + params) def get_layer_info(digest, image_dir): -- cgit