Merge lp:~jibel/ubuntu/artful/apport/lp1582950_ubiquity_hook into lp:~ubuntu-core-dev/ubuntu/artful/apport/ubuntu

Proposed by Jean-Baptiste Lallement
Status: Merged
Merged at revision: 2584
Proposed branch: lp:~jibel/ubuntu/artful/apport/lp1582950_ubiquity_hook
Merge into: lp:~ubuntu-core-dev/ubuntu/artful/apport/ubuntu
Diff against target: 12 lines (+1/-1)
1 file modified
data/package-hooks/source_ubiquity.py (+1/-1)
To merge this branch: bzr merge lp:~jibel/ubuntu/artful/apport/lp1582950_ubiquity_hook
Reviewer Review Type Date Requested Status
Brian Murray Approve
Ubuntu Core Development Team Pending
Review via email: mp+331438@code.launchpad.net

Description of the change

Convert the content of syslog from Bytes to string otherwise all the comparison and regex matches in the hook are failing.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for working on this, I'll get it merged and uploaded.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/package-hooks/source_ubiquity.py'
2--- data/package-hooks/source_ubiquity.py 2016-07-19 13:15:27 +0000
3+++ data/package-hooks/source_ubiquity.py 2017-09-27 18:08:14 +0000
4@@ -57,7 +57,7 @@
5
6 def add_info(report, ui):
7 add_installation_log(report, 'UbiquitySyslog', 'syslog')
8- syslog = report['UbiquitySyslog']
9+ syslog = report['UbiquitySyslog'].decode('utf-8', 'ignore')
10 if 'Buffer I/O error on device' in syslog:
11 if re.search('Attached .* CD-ROM (\w+)', syslog):
12 cd_drive = re.search('Attached .* CD-ROM (\w+)', syslog).group(1)

Subscribers

People subscribed via source and target branches