Re: [virt-bootstrap] [PATCH 2/3] source-docker: Show error if skopeo not installed

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

 



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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux