mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
Do not decode output from osc api calls
Do not guess the decoding of the returned output on osc api calls. This could lead to unexptected behavior. Just use sys.stdout.buffer.write() to print the bytes-like object in python3.
This commit is contained in:
parent
107976e8f8
commit
cc44dded85
@ -7993,7 +7993,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
data=opts.data,
|
||||
file=opts.file,
|
||||
headers=opts.headers)
|
||||
out = decode_it(r.read())
|
||||
out = r.read()
|
||||
|
||||
if opts.edit:
|
||||
text = edit_text(out)
|
||||
@ -8001,9 +8001,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
url,
|
||||
data=text,
|
||||
headers=opts.headers)
|
||||
out = decode_it(r.read())
|
||||
out = r.read()
|
||||
|
||||
sys.stdout.write(out)
|
||||
if isinstance(out, str):
|
||||
sys.stdout.write(out)
|
||||
else:
|
||||
sys.stdout.buffer.write(out)
|
||||
|
||||
|
||||
@cmdln.option('-b', '--bugowner-only', action='store_true',
|
||||
|
Loading…
Reference in New Issue
Block a user