aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools
diff options
context:
space:
mode:
Diffstat (limited to 'linaro_image_tools')
-rw-r--r--linaro_image_tools/media_create/chroot_utils.py8
-rw-r--r--linaro_image_tools/media_create/rootfs.py8
-rw-r--r--linaro_image_tools/media_create/tests/test_media_create.py8
-rw-r--r--linaro_image_tools/media_create/unpack_binary_tarball.py2
4 files changed, 16 insertions, 10 deletions
diff --git a/linaro_image_tools/media_create/chroot_utils.py b/linaro_image_tools/media_create/chroot_utils.py
index bb77054..b3fb441 100644
--- a/linaro_image_tools/media_create/chroot_utils.py
+++ b/linaro_image_tools/media_create/chroot_utils.py
@@ -3,7 +3,7 @@
# Author: Guilherme Salgado <guilherme.salgado@linaro.org>
#
# This file is part of Linaro Image Tools.
-#
+#
# Linaro Image Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -45,7 +45,8 @@ def prepare_chroot(chroot_dir, tmp_dir):
def install_hwpacks(
- chroot_dir, tmp_dir, tools_dir, hwpack_force_yes, verified_files, *hwpack_files):
+ chroot_dir, tmp_dir, tools_dir, hwpack_force_yes, verified_files,
+ *hwpack_files):
"""Install the given hwpacks onto the given chroot."""
prepare_chroot(chroot_dir, tmp_dir)
@@ -78,7 +79,8 @@ def install_hwpacks(
hwpack_verified = False
if os.path.basename(hwpack_file) in verified_files:
hwpack_verified = True
- install_hwpack(chroot_dir, hwpack_file, hwpack_force_yes or hwpack_verified)
+ install_hwpack(chroot_dir, hwpack_file,
+ hwpack_force_yes or hwpack_verified)
finally:
run_local_atexit_funcs()
diff --git a/linaro_image_tools/media_create/rootfs.py b/linaro_image_tools/media_create/rootfs.py
index 0587421..2970e5e 100644
--- a/linaro_image_tools/media_create/rootfs.py
+++ b/linaro_image_tools/media_create/rootfs.py
@@ -3,7 +3,7 @@
# Author: Guilherme Salgado <guilherme.salgado@linaro.org>
#
# This file is part of Linaro Image Tools.
-#
+#
# Linaro Image Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@@ -110,12 +110,14 @@ def update_network_interfaces(root_disk, board_config):
config = ''
for interface in interfaces:
if interface not in config:
- config += "auto %(if)s\niface %(if)s inet dhcp\n" % ({'if': interface})
+ config += "auto %(if)s\niface %(if)s inet dhcp\n" % (
+ {'if': interface})
if config != '':
write_data_to_protected_file(if_path, config)
-def create_flash_kernel_config(root_disk, mmc_device_id, boot_partition_number):
+def create_flash_kernel_config(root_disk, mmc_device_id,
+ boot_partition_number):
"""Create a flash-kernel.conf file under root_disk/etc.
Uses the given partition number to figure out the boot partition.
diff --git a/linaro_image_tools/media_create/tests/test_media_create.py b/linaro_image_tools/media_create/tests/test_media_create.py
index fb1a2ef..6d280f8 100644
--- a/linaro_image_tools/media_create/tests/test_media_create.py
+++ b/linaro_image_tools/media_create/tests/test_media_create.py
@@ -2504,8 +2504,9 @@ class TestPartitionSetup(TestCaseWithFixtures):
device_info = calculate_android_partition_size_and_offset(tmpfile)
# We use map(None, ...) since it would catch if the lists are not of
# equal length and zip() would not in all cases.
- for device_pair, expected_pair in map(None, device_info,
- self.android_snowball_offsets_and_sizes):
+ snowball_info = map(None, device_info,
+ self.android_snowball_offsets_and_sizes)
+ for device_pair, expected_pair in snowball_info:
self.assertEqual(device_pair, expected_pair)
def test_partition_numbering(self):
@@ -2545,7 +2546,8 @@ class TestPartitionSetup(TestCaseWithFixtures):
def _create_qemu_img_with_partitions(self, sfdisk_commands, tempfile_size):
tmpfile = self.createTempFileAsFixture()
proc = cmd_runner.run(
- ['dd', 'of=%s' % tmpfile, 'bs=1', 'seek=%s' % tempfile_size, 'count=0'],
+ ['dd', 'of=%s' % tmpfile, 'bs=1', 'seek=%s' % tempfile_size,
+ 'count=0'],
stderr=open('/dev/null', 'w'))
proc.communicate()
stdout, stderr = run_sfdisk_commands(
diff --git a/linaro_image_tools/media_create/unpack_binary_tarball.py b/linaro_image_tools/media_create/unpack_binary_tarball.py
index 98cef1d..ba00261 100644
--- a/linaro_image_tools/media_create/unpack_binary_tarball.py
+++ b/linaro_image_tools/media_create/unpack_binary_tarball.py
@@ -3,7 +3,7 @@
# Author: Guilherme Salgado <guilherme.salgado@linaro.org>
#
# This file is part of Linaro Image Tools.
-#
+#
# Linaro Image Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or