diff mbox

[Branch,~linaro-maintainers/linaro-image-tools/trunk] Rev 254: Merge lp:~lool/linaro-image-tools/pyflake-fixes.

Message ID 20110124190829.13626.24323.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Loïc Minier Jan. 24, 2011, 7:08 p.m. UTC
Merge authors:
  Loïc Minier (lool)
Related merge proposals:
  https://code.launchpad.net/~lool/linaro-image-tools/pyflake-fixes/+merge/47135
  proposed by: Loïc Minier (lool)
  review: Approve - Guilherme Salgado (salgado)
------------------------------------------------------------
revno: 254 [merge]
committer: Loïc Minier <lool@dooz.org>
branch nick: linaro-image-tools
timestamp: Mon 2011-01-24 20:06:09 +0100
message:
  Merge lp:~lool/linaro-image-tools/pyflake-fixes.
modified:
  hwpack/config.py
  linaro_media_create/check_device.py
  linaro_media_create/partitions.py
  linaro_media_create/tests/test_media_create.py


--
lp:linaro-image-tools
https://code.launchpad.net/~linaro-maintainers/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-maintainers/linaro-image-tools/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'hwpack/config.py'
--- hwpack/config.py	2010-09-15 19:25:02 +0000
+++ hwpack/config.py	2011-01-22 00:50:19 +0000
@@ -146,7 +146,6 @@ 
         """
         sources = {}
         sections = self.parser.sections()
-        found = False
         for section_name in sections:
             if section_name == self.MAIN_SECTION:
                 continue

=== modified file 'linaro_media_create/check_device.py'
--- linaro_media_create/check_device.py	2011-01-11 21:26:54 +0000
+++ linaro_media_create/check_device.py	2011-01-22 00:50:19 +0000
@@ -1,5 +1,4 @@ 
 import glob
-import sys
 
 import dbus
 

=== modified file 'linaro_media_create/partitions.py'
--- linaro_media_create/partitions.py	2011-01-14 16:10:16 +0000
+++ linaro_media_create/partitions.py	2011-01-22 00:50:19 +0000
@@ -89,8 +89,6 @@ 
     """Is the given partition mounted?"""
     device_path = _get_udisks_device_path(partition)
     device = dbus.SystemBus().get_object(UDISKS, device_path)
-    is_partition = device.Get(
-        device_path, 'DeviceIsPartition', dbus_interface=DBUS_PROPERTIES)
     return device.Get(
         device_path, 'DeviceIsMounted', dbus_interface=DBUS_PROPERTIES)
 

=== modified file 'linaro_media_create/tests/test_media_create.py'
--- linaro_media_create/tests/test_media_create.py	2011-01-19 20:52:56 +0000
+++ linaro_media_create/tests/test_media_create.py	2011-01-22 00:50:54 +0000
@@ -1,4 +1,3 @@ 
-from contextlib import contextmanager
 import atexit
 import glob
 import os
@@ -111,7 +110,6 @@ 
             fixture.mock.commands_executed)
 
     def test_not_found_package(self):
-        fixture = self.useFixture(MockCmdRunnerPopenFixture())
         self.assertRaises(
             UnableToFindPackageProvidingCommand,
             install_package_providing, 'mkfs.lean')
@@ -581,7 +579,7 @@ 
             partitions, 'get_boot_and_root_loopback_devices',
             lambda image: ('/dev/loop99', '/dev/loop98')))
         uuid = '2e82008e-1af3-4699-8521-3bf5bac1e67a'
-        bootfs, rootfs = setup_partitions(
+        bootfs_dev, rootfs_dev = setup_partitions(
             'beagle', Media(tempfile), 32, '2G', 'boot', 'root', 'ext3',
             uuid, True, True, True)
         self.assertEqual(
@@ -592,8 +590,8 @@ 
               tempfile],
              # Make sure changes are written to disk.
              ['sync'],
-             ['sudo', 'mkfs.vfat', '-F', '32', bootfs, '-n', 'boot'],
-             ['sudo', 'mkfs.ext3', '-U', uuid, rootfs, '-L', 'root']],
+             ['sudo', 'mkfs.vfat', '-F', '32', bootfs_dev, '-n', 'boot'],
+             ['sudo', 'mkfs.ext3', '-U', uuid, rootfs_dev, '-L', 'root']],
             popen_fixture.mock.calls)
 
     def test_setup_partitions_for_block_device(self):
@@ -613,7 +611,7 @@ 
         media.is_block_device = True
         popen_fixture = self.useFixture(MockCmdRunnerPopenFixture())
         uuid = '2e82008e-1af3-4699-8521-3bf5bac1e67a'
-        bootfs, rootfs = setup_partitions(
+        bootfs_dev, rootfs_dev = setup_partitions(
             'beagle', media, 32, '2G', 'boot', 'root', 'ext3', uuid, True,
             True, True)
         self.assertEqual(
@@ -622,10 +620,10 @@ 
              ['sync'],
              # Since the partitions are mounted, setup_partitions will umount
              # them before running mkfs.
-             ['sudo', 'umount', bootfs],
-             ['sudo', 'mkfs.vfat', '-F', '32', bootfs, '-n', 'boot'],
-             ['sudo', 'umount', rootfs],
-             ['sudo', 'mkfs.ext3', '-U', uuid, rootfs, '-L', 'root']],
+             ['sudo', 'umount', bootfs_dev],
+             ['sudo', 'mkfs.vfat', '-F', '32', bootfs_dev, '-n', 'boot'],
+             ['sudo', 'umount', rootfs_dev],
+             ['sudo', 'mkfs.ext3', '-U', uuid, rootfs_dev, '-L', 'root']],
             popen_fixture.mock.calls)