From patchwork Mon Jan 24 19:08:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lo=C3=AFc_Minier?= X-Patchwork-Id: 21 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:39:17 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.10 with SMTP id b10cs33837yan; Mon, 24 Jan 2011 11:08:31 -0800 (PST) Received: by 10.227.144.9 with SMTP id x9mr4829417wbu.103.1295896110741; Mon, 24 Jan 2011 11:08:30 -0800 (PST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id o67si21047016wej.173.2011.01.24.11.08.30; Mon, 24 Jan 2011 11:08:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PhRm9-0004dB-SB for ; Mon, 24 Jan 2011 19:08:29 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D251E2E8EDC for ; Mon, 24 Jan 2011 19:08:29 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-maintainers/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 254 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [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> Date: Mon, 24 Jan 2011 19:08:29 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="12248"; Instance="initZopeless config overlay" X-Launchpad-Hash: 066202aa0a934d6645c0efa300b19d9d92e110b8 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 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 === 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)