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
=== modified file 'data/package-hooks/source_ubiquity.py'
--- data/package-hooks/source_ubiquity.py 2016-07-19 13:15:27 +0000
+++ data/package-hooks/source_ubiquity.py 2017-09-27 18:08:14 +0000
@@ -57,7 +57,7 @@
5757
58def add_info(report, ui):58def add_info(report, ui):
59 add_installation_log(report, 'UbiquitySyslog', 'syslog')59 add_installation_log(report, 'UbiquitySyslog', 'syslog')
60 syslog = report['UbiquitySyslog']60 syslog = report['UbiquitySyslog'].decode('utf-8', 'ignore')
61 if 'Buffer I/O error on device' in syslog:61 if 'Buffer I/O error on device' in syslog:
62 if re.search('Attached .* CD-ROM (\w+)', syslog):62 if re.search('Attached .* CD-ROM (\w+)', syslog):
63 cd_drive = re.search('Attached .* CD-ROM (\w+)', syslog).group(1)63 cd_drive = re.search('Attached .* CD-ROM (\w+)', syslog).group(1)

Subscribers

People subscribed via source and target branches