mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +01:00
[python3] fix osc lbl non utf8 encoding
data can contain non-utf8 chars. So passing data to the decode_it function will solve this problem.
This commit is contained in:
parent
7df178b50b
commit
682452d914
@ -5591,9 +5591,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
logfile = os.path.join(buildroot, '.build.log')
|
logfile = os.path.join(buildroot, '.build.log')
|
||||||
if not os.path.isfile(logfile):
|
if not os.path.isfile(logfile):
|
||||||
raise oscerr.OscIOError(None, 'logfile \'%s\' does not exist' % logfile)
|
raise oscerr.OscIOError(None, 'logfile \'%s\' does not exist' % logfile)
|
||||||
f = open(logfile, 'r')
|
f = open(logfile, 'rb')
|
||||||
f.seek(offset)
|
f.seek(offset)
|
||||||
data = f.read(BUFSIZE)
|
data = f.read(BUFSIZE)
|
||||||
|
data = decode_it(data)
|
||||||
while len(data):
|
while len(data):
|
||||||
if opts.strip_time or conf.config['buildlog_strip_time']:
|
if opts.strip_time or conf.config['buildlog_strip_time']:
|
||||||
data = buildlog_strip_time(data)
|
data = buildlog_strip_time(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user