mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-10 13:05:46 +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:
parent
71770555ac
commit
b7dea9ddcd
@ -1032,7 +1032,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
d = '<attributes><attribute namespace=\'%s\' name=\'%s\' >%s</attribute></attributes>' % (aname[0], aname[1], values)
|
d = '<attributes><attribute namespace=\'%s\' name=\'%s\' >%s</attribute></attributes>' % (aname[0], aname[1], values)
|
||||||
url = makeurl(apiurl, attributepath)
|
url = makeurl(apiurl, attributepath)
|
||||||
for data in streamfile(url, http_POST, data=d):
|
for data in streamfile(url, http_POST, data=d):
|
||||||
sys.stdout.write(data)
|
sys.stdout.write(decode_it(data))
|
||||||
|
|
||||||
# upload file
|
# upload file
|
||||||
if opts.file:
|
if opts.file:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user