projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
399943b
)
Ignore unicode decode errors in test suite's encoded_file class
author
Pavel Labath
<pavel@labath.sk>
Sat, 1 Sep 2018 12:15:46 +0000
(12:15 +0000)
committer
Pavel Labath
<pavel@labath.sk>
Sat, 1 Sep 2018 12:15:46 +0000
(12:15 +0000)
These happen in a couple of tests when lldb tries to pretty print a
const char * variable in the inferior which points to garbage. Instead,
we have the python replace the invalid sequences with the unicode
replacement character.
llvm-svn: 341274
lldb/packages/Python/lldbsuite/support/encoded_file.py
patch
|
blob
|
history
diff --git
a/lldb/packages/Python/lldbsuite/support/encoded_file.py
b/lldb/packages/Python/lldbsuite/support/encoded_file.py
index
2c2fef3
..
5c04cce
100644
(file)
--- a/
lldb/packages/Python/lldbsuite/support/encoded_file.py
+++ b/
lldb/packages/Python/lldbsuite/support/encoded_file.py
@@
-31,7
+31,7
@@
def _encoded_write(old_write, encoding):
# If we were asked to write a `str` (in Py2) or a `bytes` (in Py3) decode it
# as unicode before attempting to write.
if isinstance(s, six.binary_type):
- s = s.decode(encoding)
+ s = s.decode(encoding
, "replace"
)
return old_write(s)
return impl