Merge lp:~rodsmith/checkbox/smart-newdisk into lp:checkbox

Proposed by Rod Smith
Status: Merged
Approved by: Daniel Manrique
Approved revision: 3410
Merged at revision: 3410
Proposed branch: lp:~rodsmith/checkbox/smart-newdisk
Merge into: lp:checkbox
Diff against target: 20 lines (+2/-1)
1 file modified
providers/plainbox-provider-checkbox/bin/disk_smart (+2/-1)
To merge this branch: bzr merge lp:~rodsmith/checkbox/smart-newdisk
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+241730@code.launchpad.net

Description of the change

Fixes bug #1392010, which caused the SMART test to fail on disks with no prior SMART tests logged.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Cool, I looked at this in context and it makes sense, plus is a fairly simple fix.

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-checkbox/bin/disk_smart'
2--- providers/plainbox-provider-checkbox/bin/disk_smart 2014-10-09 19:45:26 +0000
3+++ providers/plainbox-provider-checkbox/bin/disk_smart 2014-11-13 19:02:08 +0000
4@@ -35,6 +35,7 @@
5
6 Changelog:
7
8+v1.4: Fix script failure on disks with no pre-existing SMART tests
9 v1.3: Fix detection of SMART availability & activate SMART if available
10 but deactivated. Also use smartctl return value rather than string-
11 matching to determine if a test has failed; this should be more
12@@ -167,7 +168,7 @@
13 line = next(stdout_lines)
14 if not line.startswith('Num'):
15 entries.append('No entries found in log yet')
16- return entries
17+ return entries, returncode
18 columns = ['number', 'description', 'status',
19 'remaining', 'lifetime', 'lba']
20 lengths = [line.index(i) for i in line.split()]

Subscribers

People subscribed via source and target branches