Merge lp:~mabac/linaro-image-tools/bug-711237-sort-devices into lp:linaro-image-tools/11.11

Proposed by Mattias Backman
Status: Merged
Merged at revision: 334
Proposed branch: lp:~mabac/linaro-image-tools/bug-711237-sort-devices
Merge into: lp:linaro-image-tools/11.11
Diff against target: 11 lines (+1/-0)
1 file modified
linaro_image_tools/media_create/check_device.py (+1/-0)
To merge this branch: bzr merge lp:~mabac/linaro-image-tools/bug-711237-sort-devices
Reviewer Review Type Date Requested Status
Guilherme Salgado (community) Approve
Review via email: mp+59349@code.launchpad.net

Description of the change

Hi,

This change sorts the list of devices before printing them in _print_devices().

Thanks,

Mattias

To post a comment you must log in.
Revision history for this message
Guilherme Salgado (salgado) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro_image_tools/media_create/check_device.py'
2--- linaro_image_tools/media_create/check_device.py 2011-03-23 22:25:10 +0000
3+++ linaro_image_tools/media_create/check_device.py 2011-04-28 11:14:29 +0000
4@@ -70,6 +70,7 @@
5 bus, udisks = _get_system_bus_and_udisks_iface()
6 print '%-16s %-16s %s' % ('Device', 'Mount point', 'Size')
7 devices = udisks.get_dbus_method('EnumerateDevices')()
8+ devices.sort()
9 for path in devices:
10 device = bus.get_object("org.freedesktop.UDisks", path)
11 device_file = _get_dbus_property('DeviceFile', device, path)

Subscribers

People subscribed via source and target branches