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

[python3] return value when adding attrs is bytes

When adding attribute with osc meta attribute <prj> -a <attr> -s '<val>'
the api call gets executed successfull but the return value needs to be
decoded to print it correctly.
This commit is contained in:
lethliel 2019-04-16 14:57:19 +02:00
parent 71770555ac
commit b7dea9ddcd

View File

@ -1032,7 +1032,7 @@ class Osc(cmdln.Cmdln):
d = '<attributes><attribute namespace=\'%s\' name=\'%s\' >%s</attribute></attributes>' % (aname[0], aname[1], values)
url = makeurl(apiurl, attributepath)
for data in streamfile(url, http_POST, data=d):
sys.stdout.write(data)
sys.stdout.write(decode_it(data))
# upload file
if opts.file: