1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-08 22:18:43 +02:00

fix outupt of status on attribute deletion

On osc meta attribute --attribue <name> --delete the returned
data is encoded. Therefore the sys.stdout.write(data) call fails.

Solution: Decode data

--> sys.stdout.write(decode_it(data))
This commit is contained in:
lethliel
2019-05-22 12:57:02 +02:00
parent 8b56405d10
commit 260d5f585a

View File

@@ -1102,7 +1102,7 @@ class Osc(cmdln.Cmdln):
attributepath.append(opts.attribute)
u = makeurl(apiurl, attributepath)
for data in streamfile(u, http_DELETE):
sys.stdout.write(data)
sys.stdout.write(decode_it(data))
else:
raise oscerr.WrongOptions('The --delete switch is only for pattern metadata or attributes.')