diff options
author | Dan Streetman <ddstreet@canonical.com> | 2018-04-10 09:19:15 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-05-24 14:57:03 +0100 |
commit | 476bd7f324dcfa8189860400bc83e7aaaa86f174 (patch) | |
tree | c64b068b5805156e8e888e3d4fa9945ede2e2373 /po/vi.po | |
parent | c8e1dc4951690e709cca32718c07ef7899736039 (diff) | |
download | sos-476bd7f324dcfa8189860400bc83e7aaaa86f174.tar.gz |
[Plugin] Fix string decoding for debug log output
In add_string_as_file and _collect_strings, the first line of each
string is printed to debug log, however there is a bug in
_collect_strings that tries to decode the first line of '...'
instead of the actual string; this causes a error like:
File "/usr/share/sosreport/sos/sosreport.py", line 1300, in collect
plug.collect()
File "/usr/share/sosreport/sos/plugins/__init__.py", line 877, in collect
self._collect_strings()
File "/usr/share/sosreport/sos/plugins/__init__.py", line 860, in _collect_strings
(content.splitlines()[0]).decode('utf8', 'ignore'))
AttributeError: 'str' object has no attribute 'decode'
This simplifies the (string or bytearray)-to-first-line-string of both
functions, which also fixes the bug using the wrong variable to decode.
Fixes: 7ba2fb47d05b608f3863fda9271894e38b43937a
Resolves: #1267
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'po/vi.po')
0 files changed, 0 insertions, 0 deletions