Merge ~sylvain-pineau/checkbox-support:interactive_cmd_ignore_unicode_errors into checkbox-support:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 177c290d4316b9146146154e7891b7eeebbc59cd
Merged at revision: c6a6cc0e3a75226cc44033d5a3890b4c1c9ee308
Proposed branch: ~sylvain-pineau/checkbox-support:interactive_cmd_ignore_unicode_errors
Merge into: checkbox-support:master
Diff against target: 12 lines (+1/-1)
1 file modified
checkbox_support/interactive_cmd.py (+1/-1)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+375785@code.launchpad.net

Description of the change

Got this error when using interactive_cmd. Let's just ignore bad chars.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/checkbox_support/interactive_cmd.py b/checkbox_support/interactive_cmd.py
2index 4c870f9..b7b8f7b 100644
3--- a/checkbox_support/interactive_cmd.py
4+++ b/checkbox_support/interactive_cmd.py
5@@ -125,7 +125,7 @@ class InteractiveCommand:
6 else:
7 raw = self._proc.stdout.read(self._pending)
8 self._pending = 0
9- decoded = raw.decode(sys.stdout.encoding)
10+ decoded = raw.decode(sys.stdout.encoding, errors='ignore')
11 self._logger.debug("Read %s bytes. : %s" % (len(raw), decoded))
12 return decoded
13

Subscribers

People subscribed via source and target branches