diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 617: PEP8 fixes.

Message ID 20130403151113.26327.18676.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Milo Casagrande April 3, 2013, 3:11 p.m. UTC
Merge authors:
  James Tunnicliffe (dooferlad)
Related merge proposals:
  https://code.launchpad.net/~dooferlad/linaro-image-tools/pep8-fixes/+merge/156810
  proposed by: James Tunnicliffe (dooferlad)
  review: Approve - Milo Casagrande (milo)
------------------------------------------------------------
revno: 617 [merge]
author: James Tunnicliffe <dooferlad@gmail.com>
committer: Milo Casagrande <milo@ubuntu.com>
branch nick: trunk
timestamp: Wed 2013-04-03 17:10:22 +0200
message:
  PEP8 fixes.
modified:
  linaro_image_tools/media_create/android_boards.py
  linaro_image_tools/media_create/boards.py
  linaro_image_tools/media_create/tests/test_android_boards.py
  linaro_image_tools/media_create/tests/test_media_create.py


--
lp:linaro-image-tools
https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk

You are subscribed to branch lp:linaro-image-tools.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'linaro_image_tools/media_create/android_boards.py'
--- linaro_image_tools/media_create/android_boards.py	2013-03-26 08:59:38 +0000
+++ linaro_image_tools/media_create/android_boards.py	2013-04-03 11:32:40 +0000
@@ -508,9 +508,9 @@ 
         self.initrd_addr = '0x41000000'
         self.dtb_addr = '0x41f00000'
         self.dtb_name = 'exynos5250-arndale.dtb'
-        self._android_specific_args = ('init=/init '
-                'androidboot.console=ttySAC2 console=ttySAC2 '
-                'initrd=%s' % self.initrd_addr)
+        self._android_specific_args = (
+            'init=/init androidboot.console=ttySAC2 console=ttySAC2 initrd=%s'
+            % self.initrd_addr)
         self._extra_serial_options = 'ttySAC2,115200n8'
         self._extra_boot_args_options = 'rootdelay=3'
 
@@ -533,8 +533,8 @@ 
             if d_img_data is not None:
                 assert self.dtb_addr is not None, (
                     "Need a dtb_addr when passing d_img_data")
-                boot_script += (("%(fatload_command)s mmc %(mmc_option)s "
-                    "%(dtb_addr)s ")) % replacements
+                boot_script += ("%(fatload_command)s mmc %(mmc_option)s "
+                                "%(dtb_addr)s " % replacements)
                 boot_script += "%s; " % d_img_data
         boot_script += (("bootm %(kernel_addr)s")) % replacements
         if i_img_data is not None:
@@ -559,8 +559,8 @@ 
             name = boot_bin['name']
             file_path = os.path.join(chroot_dir, boot_partition, name)
             if not os.path.exists(file_path):
-                raise BoardException("File '%s' does not exists. Cannot "
-                        "proceed." % name)
+                raise BoardException(
+                    "File '%s' does not exists. Cannot proceed." % name)
             _dd(file_path, boot_device_or_file, seek=boot_bin['seek'])
 
 

=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py	2013-03-26 09:08:58 +0000
+++ linaro_image_tools/media_create/boards.py	2013-04-03 11:32:40 +0000
@@ -533,8 +533,8 @@ 
             if d_img_data is not None:
                 assert self.dtb_addr is not None, (
                     "Need a dtb_addr when passing d_img_data")
-                boot_script += (("%(fatload_command)s mmc %(mmc_option)s "
-                    "%(dtb_addr)s board.dtb; ")) % replacements
+                boot_script += ("%(fatload_command)s mmc %(mmc_option)s "
+                                "%(dtb_addr)s board.dtb; " % replacements)
         boot_script += (("bootm %(kernel_addr)s")) % replacements
         if i_img_data is not None:
             boot_script += ((" %(initrd_addr)s")) % replacements
@@ -1594,8 +1594,8 @@ 
             name = boot_bin['name']
             file_path = os.path.join(chroot_dir, boot_partition, name)
             if not os.path.exists(file_path):
-                raise BoardException("File '%s' does not exists. Cannot "
-                        "proceed." % name)
+                raise BoardException(
+                    "File '%s' does not exists. Cannot proceed." % name)
             _dd(file_path, boot_device_or_file, seek=boot_bin['seek'])
 
 

=== modified file 'linaro_image_tools/media_create/tests/test_android_boards.py'
--- linaro_image_tools/media_create/tests/test_android_boards.py	2013-03-25 12:52:28 +0000
+++ linaro_image_tools/media_create/tests/test_android_boards.py	2013-04-03 11:32:40 +0000
@@ -489,10 +489,10 @@ 
                         'init=/init androidboot.console=ttySAC2 '
                         'console=ttySAC2 initrd=0x41000000',
             'bootcmd': 'fatload mmc 0:1 0x40007000 uImage; fatload mmc 0:1 '
-                        '0x41000000 uInitrd; fatload mmc 0:1 0x41f00000 '
-                        'exynos5250-arndale.dtb; bootm 0x40007000 0x41000000 '
-                        '0x41f00000',
+                       '0x41000000 uInitrd; fatload mmc 0:1 0x41f00000 '
+                       'exynos5250-arndale.dtb; bootm 0x40007000 0x41000000 '
+                       '0x41f00000',
             'fdt_high': '0xffffffff',
             'initrd_high': '0xffffffff',
-            }
+        }
         self.assertBootEnv(expected, board='arndale')

=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
--- linaro_image_tools/media_create/tests/test_media_create.py	2013-03-26 08:59:38 +0000
+++ linaro_image_tools/media_create/tests/test_media_create.py	2013-04-03 11:32:40 +0000
@@ -1519,8 +1519,8 @@ 
     def test_origen_quad_raw(self):
         # Need to mock this since files do not exist here, and
         # an Exception is raised.
-        self.useFixture(MockSomethingFixture(os.path, 'exists',
-            lambda exists: True))
+        self.useFixture(
+            MockSomethingFixture(os.path, 'exists', lambda exists: True))
 
         self.populate_raw_partition(boards.OrigenQuadConfig())
         expected = ['_dd', '_dd', '_dd', '_dd', '_dd']
@@ -1528,8 +1528,8 @@ 
 
     def test_origen_quad_raises(self):
         board_conf = boards.OrigenQuadConfig()
-        self.assertRaises(boards.BoardException,
-                board_conf.populate_raw_partition, '', '')
+        self.assertRaises(
+            boards.BoardException, board_conf.populate_raw_partition, '', '')
 
     def test_arndale_raw(self):
         self.useFixture(MockSomethingFixture(os.path, 'getsize',
@@ -1648,20 +1648,20 @@ 
         fixture = MockCmdRunnerPopenFixture()
         self.useFixture(fixture)
         expected_commands = [
-                ('sudo -E dd if=/dev/zero of= bs=512 conv=notrunc count=32 '
-                 'seek=1601'),
-                ('sudo -E dd if=boot/origen_quad.bl1.bin of= bs=512 '
-                 'conv=notrunc seek=1'),
-                ('sudo -E dd if=boot/origen_quad-spl.bin.signed of= bs=512 '
-                 'conv=notrunc seek=31'),
-                ('sudo -E dd if=boot/u-boot.bin of= bs=512 conv=notrunc '
-                 'seek=63'),
-                ('sudo -E dd if=boot/exynos4x12.tzsw.signed.img of= bs=512 '
-                 'conv=notrunc seek=761')
-                ]
+            ('sudo -E dd if=/dev/zero of= bs=512 conv=notrunc count=32 '
+             'seek=1601'),
+            ('sudo -E dd if=boot/origen_quad.bl1.bin of= bs=512 '
+             'conv=notrunc seek=1'),
+            ('sudo -E dd if=boot/origen_quad-spl.bin.signed of= bs=512 '
+             'conv=notrunc seek=31'),
+            ('sudo -E dd if=boot/u-boot.bin of= bs=512 conv=notrunc '
+             'seek=63'),
+            ('sudo -E dd if=boot/exynos4x12.tzsw.signed.img of= bs=512 '
+             'conv=notrunc seek=761')
+        ]
 
-        self.useFixture(MockSomethingFixture(os.path, 'exists',
-            lambda exists: True))
+        self.useFixture(
+            MockSomethingFixture(os.path, 'exists', lambda exists: True))
 
         self.populate_raw_partition(android_boards.AndroidOrigenQuadConfig())
         expected = []