From a87d2c1202481cfb98c0c3bf15b3b7b94450104c Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Thu, 4 Jun 2020 15:09:03 +0200 Subject: [PATCH] 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)). --- osc/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osc/core.py b/osc/core.py index 05ae3f19..d32b4972 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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