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
=== modified file 'providers/plainbox-provider-checkbox/bin/disk_smart'
--- providers/plainbox-provider-checkbox/bin/disk_smart 2014-10-09 19:45:26 +0000
+++ providers/plainbox-provider-checkbox/bin/disk_smart 2014-11-13 19:02:08 +0000
@@ -35,6 +35,7 @@
3535
36Changelog:36Changelog:
3737
38v1.4: Fix script failure on disks with no pre-existing SMART tests
38v1.3: Fix detection of SMART availability & activate SMART if available39v1.3: Fix detection of SMART availability & activate SMART if available
39 but deactivated. Also use smartctl return value rather than string-40 but deactivated. Also use smartctl return value rather than string-
40 matching to determine if a test has failed; this should be more41 matching to determine if a test has failed; this should be more
@@ -167,7 +168,7 @@
167 line = next(stdout_lines)168 line = next(stdout_lines)
168 if not line.startswith('Num'):169 if not line.startswith('Num'):
169 entries.append('No entries found in log yet')170 entries.append('No entries found in log yet')
170 return entries171 return entries, returncode
171 columns = ['number', 'description', 'status',172 columns = ['number', 'description', 'status',
172 'remaining', 'lifetime', 'lba']173 'remaining', 'lifetime', 'lba']
173 lengths = [line.index(i) for i in line.split()]174 lengths = [line.index(i) for i in line.split()]

Subscribers

People subscribed via source and target branches