[virt-tools-list] [virt-bootstrap] [PATCH 6/7] pylint: Resolve similar lines

Cedric Bosdonnat cbosdonnat at suse.com
Thu Mar 1 09:28:39 UTC 2018


Are you sure you meant 'similar'? I don't really get the point of the
warning, thought I ACK the content of the patch.

--
Cedric

On Wed, 2018-02-28 at 00:11 +0000, Radostin Stoyanov wrote:
> Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
> ---
>  src/virtBootstrap/sources/docker_source.py | 3 +--
>  src/virtBootstrap/sources/file_source.py   | 6 ++----
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/src/virtBootstrap/sources/docker_source.py b/src/virtBootstrap/sources/docker_source.py
> index ff96078..715e560 100644
> --- a/src/virtBootstrap/sources/docker_source.py
> +++ b/src/virtBootstrap/sources/docker_source.py
> @@ -304,8 +304,7 @@ class DockerSource(object):
>                      logger.info("Mapping UID/GID")
>                      utils.map_id_in_image(
>                          len(self.layers),  # Number of layers
> -                        dest,
> -                        self.uid_map,
> +                        dest, self.uid_map,
>                          self.gid_map,
>                          (self.root_password is None)  # Create new disk?
>                      )
> diff --git a/src/virtBootstrap/sources/file_source.py b/src/virtBootstrap/sources/file_source.py
> index be741ea..6b45bab 100644
> --- a/src/virtBootstrap/sources/file_source.py
> +++ b/src/virtBootstrap/sources/file_source.py
> @@ -49,9 +49,9 @@ class FileSource(object):
>          """
>          self.path = kwargs['uri'].path
>          self.output_format = kwargs.get('fmt', utils.DEFAULT_OUTPUT_FORMAT)
> +        self.root_password = kwargs.get('root_password', None)
>          self.uid_map = kwargs.get('uid_map', [])
>          self.gid_map = kwargs.get('gid_map', [])
> -        self.root_password = kwargs.get('root_password', None)
>          self.progress = kwargs['progress'].update_progress
>  
>      def unpack(self, dest):
> @@ -85,9 +85,7 @@ class FileSource(object):
>                  logger.info("Mapping UID/GID")
>                  utils.map_id_in_image(
>                      1,  # Number of layers
> -                    dest,
> -                    self.uid_map,
> -                    self.gid_map,
> +                    dest, self.uid_map, self.gid_map,
>                      (self.root_password is None)  # Create new disk?
>                  )
>  




More information about the virt-tools-list mailing list