From 03777b7e4d43521089e5fcc6d8a8315b9b758ded Mon Sep 17 00:00:00 2001 From: lethliel Date: Tue, 14 May 2019 10:01:02 +0200 Subject: [PATCH] fix get_commitlog to decode correct. get_commitlog mixes bytes and strings when the output is xml or csv. This is fixed by decoding the commit message before replacing chars. --- osc/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osc/core.py b/osc/core.py index 19c46787..036b2b0a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -6330,7 +6330,7 @@ def get_commitlog(apiurl, prj, package, revision, format = 'text', meta = False, if format == 'csv': s = '%s|%s|%s|%s|%s|%s|%s' % (rev, user, t, srcmd5, version, - comment.replace('\\', '\\\\').replace('\n', '\\n').replace('|', '\\|'), requestid) + decode_it(comment).replace('\\', '\\\\').replace('\n', '\\n').replace('|', '\\|'), requestid) r.append(s) elif format == 'xml': r.append('%s' % t) r.append('%s' % requestid) r.append('%s' % - comment.replace('&', '&').replace('<', '>').replace('>', '<')) + decode_it(comment).replace('&', '&').replace('<', '>').replace('>', '<')) r.append('') else: if requestid: