[virt-tools-list] [virt-bootstrap] [PATCH 2/3] source-docker: Show error if skopeo not installed
Cedric Bosdonnat
cbosdonnat at suse.com
Tue Nov 21 10:38:03 UTC 2017
On Wed, 2017-11-01 at 00:19 +0000, Radostin Stoyanov wrote:
> Show appropriate error message when skopeo is not installed.
> ---
> src/virtBootstrap/sources/docker_source.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/virtBootstrap/sources/docker_source.py b/src/virtBootstrap/sources/docker_source.py
> index ef72d64..a73fa64 100644
> --- a/src/virtBootstrap/sources/docker_source.py
> +++ b/src/virtBootstrap/sources/docker_source.py
> @@ -62,6 +62,10 @@ class DockerSource(object):
> [[<start>, <target>, <count>], [<start>, <target>, <count>] ...]
> """
>
> + # Check if skopeo is installed
> + if not utils.is_installed('skopeo'):
> + raise RuntimeError('skopeo is not installed')
> +
> self.url = self.gen_valid_uri(kwargs['uri'])
> self.username = kwargs.get('username', None)
> self.password = kwargs.get('password', None)
ACK
--
Cedric
More information about the virt-tools-list
mailing list