[virt-tools-list] [virt-bootstrap] [PATCH 6/7] pylint: Resolve similar lines
Radostin Stoyanov
rstoyanov1 at gmail.com
Wed Feb 28 00:11:04 UTC 2018
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?
)
--
2.14.3
More information about the virt-tools-list
mailing list