1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-25 19:52:12 +01:00

Document a potential decoding issue in print_buildlog

We should reconsider this in the future (in practice, it does not
seem to cause too much trouble (at least I'm not aware of any bug
reports)).
This commit is contained in:
Marcus Huewe 2020-06-04 15:09:03 +02:00
parent 869772f054
commit a87d2c1202

View File

@ -6118,6 +6118,8 @@ def print_buildlog(apiurl, prj, package, repository, arch, offset=0, strip_time=
def print_data(data, strip_time=False):
if strip_time:
data = buildlog_strip_time(data)
# hmm calling decode_it is a bit problematic because data might begin
# or end with an, for instance, incomplete utf-8 sequence
sys.stdout.write(decode_it(data.translate(all_bytes, remove_bytes)))
# to protect us against control characters