1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

fix decoding in interactive request mode

In interactive review mode:

If a diff is issued and the request is accepted with 'a -m ok'
the tmpfile with the diff will be read. This tmpfile.read() call
is now decoded properly.
This commit is contained in:
lethliel 2020-01-24 09:23:24 +01:00
parent efbc60f147
commit 0b7b515f11

View File

@ -7528,7 +7528,7 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
if tmpfile is not None: if tmpfile is not None:
tmpfile.seek(0) tmpfile.seek(0)
# the read bytes probably have a moderate size so the str won't be too large # the read bytes probably have a moderate size so the str won't be too large
footer += '\n\n' + tmpfile.read() footer += '\n\n' + decode_it(tmpfile.read())
if msg is None: if msg is None:
try: try:
msg = edit_message(footer = footer, template=msg_template) msg = edit_message(footer = footer, template=msg_template)