aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ziptest_link
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-03-28 13:57:25 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-28 13:57:25 +0100
commit3d23564348799dfee88466f7439662c9d1e1b698 (patch)
treeb87578ca78a5f4aac2922f48b770202916810166 /tests/ziptest_link
parent670a6c86348a0b6fad095485de1f660e808117f9 (diff)
downloadsos-3d23564348799dfee88466f7439662c9d1e1b698.tar.gz
[reporting] workaround six mishandling of '\$' strings
There is a problem with six's handling of strings that end with a backslash: https://bitbucket.org/gutworth/six/issues/60/sixu-mishandles-string-ending-in-backslash This leads to an ugly exception during reporting if any filename ends with this character: Traceback (most recent call last): File "/usr/sbin/sosreport", line 25, in <module> main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1632, in main sos.execute() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1607, in execute self.plain_report() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1358, in plain_report output = PlainTextReport(report).unicode() File "/usr/lib/python2.7/site-packages/sos/reporting.py", line 151, in unicode else six.u(i)), buf)) File "/usr/lib/python2.7/site-packages/sos/reporting.py", line 151, in <lambda> else six.u(i)), buf)) File "/usr/lib/python2.7/site-packages/six.py", line 647, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 25: \ at end of string Avoid this problem by re-packing the buffer and adding a single ' ' character to the end of any string ending with '\'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests/ziptest_link')
0 files changed, 0 insertions, 0 deletions