Merge lp:~brian-murray/apport/disk-errors-in-current-dmesg into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray on 2011-09-16
Status: Merged
Merged at revision: 1848
Proposed branch: lp:~brian-murray/apport/disk-errors-in-current-dmesg
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 41 lines (+14/-2)
2 files modified
data/general-hooks/ubuntu.py (+7/-2)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~brian-murray/apport/disk-errors-in-current-dmesg
Reviewer Review Type Date Requested Status
Martin Pitt 2011-09-19 Approve on 2011-09-19
Ubuntu Core Development Team 2011-09-16 Pending
Review via email: mp+75790@code.launchpad.net
To post a comment you must log in.
Martin Pitt (pitti) wrote :

Thanks! Merged with a small code cleanup.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/general-hooks/ubuntu.py'
2--- data/general-hooks/ubuntu.py 2011-09-08 17:56:10 +0000
3+++ data/general-hooks/ubuntu.py 2011-09-16 17:53:25 +0000
4@@ -186,7 +186,9 @@
5
6 def check_for_disk_error(report):
7 devs_to_check = []
8- if not 'Df.txt' in report or not 'Dmesg.txt' in report:
9+ if not 'Dmesg.txt' in report and not 'CurrentDmesg.txt' in report:
10+ return
11+ if not 'Df.txt' in report:
12 return
13 df = report['Df.txt']
14 for line in df:
15@@ -196,7 +198,10 @@
16 device = line.split(' ')[0].strip('0123456789')
17 device = device.replace('/dev/', '')
18 devs_to_check.append(device)
19- dmesg = report['Dmesg.txt']
20+ if 'CurrentDmesg.txt' in report:
21+ dmesg = report['CurrentDmesg.txt']
22+ elif 'Dmesg.txt' in report:
23+ dmesg = report['Dmesg.txt']
24 for line in dmesg:
25 line = line.strip('\n')
26 if 'I/O error' in line:
27
28=== modified file 'debian/changelog'
29--- debian/changelog 2011-09-14 06:29:56 +0000
30+++ debian/changelog 2011-09-16 17:53:25 +0000
31@@ -1,3 +1,10 @@
32+apport (1.23-0ubuntu2) oneiric; urgency=low
33+
34+ * data/general-hooks/ubuntu.py: also check CurrentDmesg for disk errors
35+ as some package hooks add it
36+
37+ -- Brian Murray <brian@ubuntu.com> Fri, 16 Sep 2011 10:43:27 -0700
38+
39 apport (1.23-0ubuntu1) oneiric; urgency=low
40
41 [ Brian Murray ]

Subscribers

People subscribed via source and target branches