Fix formatting

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2020-08-20 15:09:27 +02:00
parent 40bbb4325a
commit e628bb91ec
3 changed files with 41 additions and 16 deletions

View File

@ -512,7 +512,7 @@ def prepare_iso(
else:
data = iso.get_graft_points(
compose.paths.compose.topdir(),
[iso._paths_from_list(tree_dir, split_iso_data["files"]), iso_dir]
[iso._paths_from_list(tree_dir, split_iso_data["files"]), iso_dir],
)
if compose.conf["createiso_break_hardlinks"]:

View File

@ -199,7 +199,9 @@ def get_iso_contents(
buildinstall_dir = os.path.join(buildinstall_dir, variant.uid)
copy_boot_images(buildinstall_dir, iso_dir)
files = iso.get_graft_points(compose.paths.compose.topdir(), [buildinstall_dir, iso_dir])
files = iso.get_graft_points(
compose.paths.compose.topdir(), [buildinstall_dir, iso_dir]
)
# We need to point efiboot.img to compose/ tree, because it was
# modified in buildinstall phase and the file in work/ has different
@ -215,19 +217,25 @@ def get_iso_contents(
# Get packages...
package_dir = compose.paths.compose.packages(arch, var)
for k, v in iso.get_graft_points(compose.paths.compose.topdir(), [package_dir]).items():
for k, v in iso.get_graft_points(
compose.paths.compose.topdir(), [package_dir]
).items():
files[os.path.join(var.uid, "Packages", k)] = v
# Get repodata...
tree_dir = compose.paths.compose.repository(arch, var)
repo_dir = os.path.join(tree_dir, "repodata")
for k, v in iso.get_graft_points(compose.paths.compose.topdir(), [repo_dir]).items():
for k, v in iso.get_graft_points(
compose.paths.compose.topdir(), [repo_dir]
).items():
files[os.path.join(var.uid, "repodata", k)] = v
if inherit_extra_files:
# Get extra files...
extra_files_dir = compose.paths.work.extra_files_dir(arch, var)
for k, v in iso.get_graft_points(compose.paths.compose.topdir(), [extra_files_dir]).items():
for k, v in iso.get_graft_points(
compose.paths.compose.topdir(), [extra_files_dir]
).items():
files[os.path.join(var.uid, k)] = v
extra_files_dir = compose.paths.work.extra_iso_extra_files_dir(arch, variant)
@ -243,7 +251,9 @@ def get_iso_contents(
)
# Add extra files specific for the ISO
files.update(iso.get_graft_points(compose.paths.compose.topdir(), [extra_files_dir]))
files.update(
iso.get_graft_points(compose.paths.compose.topdir(), [extra_files_dir])
)
gp = "%s-graft-points" % iso_dir
iso.write_graft_points(gp, files, exclude=["*/lost+found", "*/boot.iso"])

View File

@ -665,8 +665,12 @@ class GetIsoContentsTest(helpers.PungiTestCase):
six.assertCountEqual(
self,
ggp.call_args_list,
[mock.call(self.compose.paths.compose.topdir(),
[os.path.join(self.topdir, x)]) for x in gp],
[
mock.call(
self.compose.paths.compose.topdir(), [os.path.join(self.topdir, x)]
)
for x in gp
],
)
self.assertEqual(len(wgp.call_args_list), 1)
self.assertEqual(wgp.call_args_list[0][0][0], gp_file)
@ -735,8 +739,12 @@ class GetIsoContentsTest(helpers.PungiTestCase):
six.assertCountEqual(
self,
ggp.call_args_list,
[mock.call(self.compose.paths.compose.topdir(),
[os.path.join(self.topdir, x)]) for x in gp],
[
mock.call(
self.compose.paths.compose.topdir(), [os.path.join(self.topdir, x)]
)
for x in gp
],
)
self.assertEqual(len(wgp.call_args_list), 1)
self.assertEqual(wgp.call_args_list[0][0][0], gp_file)
@ -801,8 +809,12 @@ class GetIsoContentsTest(helpers.PungiTestCase):
six.assertCountEqual(
self,
ggp.call_args_list,
[mock.call(self.compose.paths.compose.topdir(),
[os.path.join(self.topdir, x)]) for x in gp],
[
mock.call(
self.compose.paths.compose.topdir(), [os.path.join(self.topdir, x)]
)
for x in gp
],
)
self.assertEqual(len(wgp.call_args_list), 1)
self.assertEqual(wgp.call_args_list[0][0][0], gp_file)
@ -893,10 +905,13 @@ class GetIsoContentsTest(helpers.PungiTestCase):
six.assertCountEqual(
self,
ggp.call_args_list,
[mock.call(self.compose.paths.compose.topdir(),
[os.path.join(self.topdir, x)]) for x in gp]
+ [mock.call(self.compose.paths.compose.topdir(),
[bi_dir, iso_dir])],
[
mock.call(
self.compose.paths.compose.topdir(), [os.path.join(self.topdir, x)]
)
for x in gp
]
+ [mock.call(self.compose.paths.compose.topdir(), [bi_dir, iso_dir])],
)
self.assertEqual(len(wgp.call_args_list), 1)
self.assertEqual(wgp.call_args_list[0][0][0], gp_file)