Merge lp:~sylvain-pineau/checkbox/fix-1323236 into lp:checkbox

Proposed by Sylvain Pineau
Status: Rejected
Rejected by: Zygmunt Krynicki
Proposed branch: lp:~sylvain-pineau/checkbox/fix-1323236
Merge into: lp:checkbox
Diff against target: 12 lines (+1/-1)
1 file modified
plainbox/plainbox/impl/exporter/xlsx.py (+1/-1)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/fix-1323236
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+221207@code.launchpad.net

Description of the change

fix the linked bug, see commits for details

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Sorry for rejecting this but I wrote an equivalent patch that is easier to read/maintain and I'd like to merge that one instead

Unmerged revisions

3034. By Sylvain Pineau

plainbox:exporter:xlsx: fallback to the device path if no product is defined

Some device information come from udev_resource and it may happen that the
device product is not available. Instead of returning an empty string,
fallback to the device path instead.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox/plainbox/impl/exporter/xlsx.py'
2--- plainbox/plainbox/impl/exporter/xlsx.py 2014-05-21 10:46:09 +0000
3+++ plainbox/plainbox/impl/exporter/xlsx.py 2014-05-28 11:21:43 +0000
4@@ -230,7 +230,7 @@
5 if result:
6 hw_info['memory'] = result.pop()
7 if '2013.com.canonical.certification::device' in data['resource_map']:
8- result = ['{}'.format(i['product'])
9+ result = ['{}'.format(i.get('product', i.get('path')))
10 for i in data["resource_map"]['2013.com.canonical.certification::device']
11 if ('category' in i and i['category'] == 'BLUETOOTH' and
12 'driver' in i)]

Subscribers

People subscribed via source and target branches